铁律: - ④重写为白名单/黑名单机制 (今日4次违规) - ⑤新增 BREAKDOWN回验协议 - ⑥新增 管线不容跳步 核心经验: - 图片+视频混合管线路线验证 - ENV底板法 (i2i→i2v) - 提示词工程: 工业术语+禁人称词+负面约束 - CHAR真人检测绕过 (blur公式) - FFmpeg xfade拼接方法 - Seedance 2.0 参数 (9:16, 4-15s) 新增文件: - eererdan/experience/EED-EXPER-001~010 - protocols/BREAKDOWN-VERIFY.hdlp - deep-sea-voyage/STORYBOARD-EP01.hdlp (Pro版26→10镜) - deep-sea-voyage/PROMPTS-EP01.hdlp - deep-sea-voyage/DIRECTOR-ENCODING-EP01.hdlp - tools/jimeng3-gen.js, run_storyboard.js, run_prompts.js, run_adapt.js, run_gen.js, crop_watermark.py - lib/seedream.py (支持 Seedream 3/4/5) - outputs/ENV-*-v5, PROP-* (6张定稿资产) - outputs/videos/M01-v2.mp4, M02.mp4 下次继续: M03~M10 (9:16竖屏)
33 lines
1015 B
Python
33 lines
1015 B
Python
# 步骤⑦ storyboard 引擎: 豆包 AI 拆解剧本
|
|
import sys, json
|
|
sys.path.insert(0, '.')
|
|
|
|
from lib.doubao_chat import breakdown_script
|
|
|
|
with open('projects/deep-sea-voyage/EP01-SCRIPT-LOCK.hdlp', 'r', encoding='utf-8') as f:
|
|
script = f.read()
|
|
|
|
print('发送豆包 AI 拆解剧本...')
|
|
result = breakdown_script(script, 1)
|
|
|
|
if 'error' in result:
|
|
print('API ERROR:', json.dumps(result, ensure_ascii=False, indent=2))
|
|
elif 'content' in result:
|
|
content = result['content']
|
|
# 提取 JSON
|
|
if '```json' in content:
|
|
content = content.split('```json')[1].split('```')[0]
|
|
elif '```' in content:
|
|
content = content.split('```')[1].split('```')[0]
|
|
|
|
# 保存到文件
|
|
out_path = 'projects/deep-sea-voyage/STORYBOARD-AI.json'
|
|
with open(out_path, 'w', encoding='utf-8') as f:
|
|
f.write(content.strip())
|
|
print('SAVED:', out_path)
|
|
print('tokens:', result.get('tokens', 'N/A'))
|
|
print('---')
|
|
print(content.strip())
|
|
else:
|
|
print('UNKNOWN:', result)
|