feat(#2170): 方舟信任链——真人照片经 Seedream AI 化后走 Seedance reference_image #2170
Reference in New Issue
Block a user
Delete Branch "feature/2170-ark-trust-chain"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
背景
用户上传真人照片做视频人物参考时,直接传给方舟 Seedance 2.5 会触发 50411 Pre Img Risk(模型层真人肖像拦截,非参数问题)。此前 #2169 走即梦 cvtob 首帧兜底是方向错误——用户要的是「人物参考」(reference_image),不是「从照片开始动」(first_frame)。
方案:方舟信任链(Trust Chain)
用户真人照片 → 同账号 Seedream 5.0 Pro 图生图(保持五官/发型/肤色/年龄感 AI 化)→ AI 产物图作为
reference_image传给 Seedance 2.5(omni_ref 模式)→ 输出带人物一致性的视频。主要改动
jimeng_client.py、JIMENG_*配置、_call_jimeng_video_generation、即梦 provider 分发、portrait_intercept→jimeng自动重试、即梦模型定价(共 1131 行删除)DoubaoClient.image_generation:POST/api/v3/images/generations,支持文生图/单张 string/多张 list,统一错误分类 +last_image_errorrole=reference_image(非 first_frame),保留用户指定 ratio(9:16 等)doubao-seed-2-1-*,video 固定doubao-seedance-2-5-260628doubao_image_model(doubao-seedream-5-0-pro-260628)、doubao_image_timeout=120_internal_fallback_only过滤积分
测试
test_ai_client_image.py10 个单测:Seedream 主路径(无 key/空 prompt/t2i/i2i 单张 string/i2i 多张 list/400 敏感/500 重试)+ 信任链 3 场景(触发链 reference_image+9:16/无图跳过/Seedream 失败回退原图 first_frame+adaptive)test_ai_client_video.py:happy path 改为纯文生避免信任链 mock 干扰;portrait 测试移除 jimeng patchtest_2035_coverage.py:_FakeSettings 补全新字段后续
🚀 预览环境已部署
🗑️ 预览环境已清理
PR #2170 已关闭或合并,对应的预览环境已被清理。