feat: add script-to-video pipeline
SEN 教学视频生成流水线:剧本 → 结构化场景 → ComfyUI 工作流 → 视频。
python3 scripts/extract_characters.py --plan 1
输出:data/parsed/story_001_characters.json
data/parsed/story_001_characters.json
python3 scripts/extract_scenes.py --plan 1
输出:data/parsed/story_001_scenes.json(含 locations 场景参考图 prompt + scenes 分场信息)
data/parsed/story_001_scenes.json
locations
scenes
# 默认:全部 location 用 Flux2 Klein T2I python3 scripts/generate_refs.py --story story_001 # 仅重生收银内景,并对比 T2I 与图像编辑两种方案 python3 scripts/generate_refs.py --story story_001 --only loc_cashier --method both
读取:data/parsed/story_001_characters.json、story_001_scenes.json
story_001_scenes.json
室外场景(如门口):Flux2 Klein T2I → loc_store_front.png
loc_store_front.png
室内场景 T2I(方案 A):修正后的 interior prompt → loc_cashier.png
loc_cashier.png
室内场景编辑(方案 B):从门口图 Flux2 dev ReferenceLatent 改视角 → loc_cashier_edit.png
loc_cashier_edit.png
--method t2i|edit|both;--only loc_cashier 只重生指定地点
--method t2i|edit|both
--only loc_cashier
清单:data/parsed/story_001_refs_manifest.json(记录 method、prompt、path)
data/parsed/story_001_refs_manifest.json
需 ComfyUI 运行于 http://127.0.0.1:8188
http://127.0.0.1:8188
输入:data/影视剧本生成.txt(步骤 2 会自动读取已生成的 *_characters.json)
data/影视剧本生成.txt
*_characters.json
本地模型:默认 Ollama qwen3-vl:30b
qwen3-vl:30b
可选:--plan 2、--model <名称>、LLM_BASE_URL=http://127.0.0.1:1234/v1
--plan 2
--model <名称>
LLM_BASE_URL=http://127.0.0.1:1234/v1
data/
prompts/
pipeline/
refer-workflows/
scripts/
版权所有:中国计算机学会技术支持:开源发展技术委员会 京ICP备13000930号-9 京公网安备 11010802047560号
video-gen
SEN 教学视频生成流水线:剧本 → 结构化场景 → ComfyUI 工作流 → 视频。
第一阶段
步骤 1:拆解角色
输出:
data/parsed/story_001_characters.json步骤 2:拆解场景
输出:
data/parsed/story_001_scenes.json(含locations场景参考图 prompt +scenes分场信息)步骤 3:生成角色/场景参考图
读取:
data/parsed/story_001_characters.json、story_001_scenes.json室外场景(如门口):Flux2 Klein T2I →
loc_store_front.png室内场景 T2I(方案 A):修正后的 interior prompt →
loc_cashier.png室内场景编辑(方案 B):从门口图 Flux2 dev ReferenceLatent 改视角 →
loc_cashier_edit.png--method t2i|edit|both;--only loc_cashier只重生指定地点清单:
data/parsed/story_001_refs_manifest.json(记录 method、prompt、path)需 ComfyUI 运行于
http://127.0.0.1:8188输入:
data/影视剧本生成.txt(步骤 2 会自动读取已生成的*_characters.json)本地模型:默认 Ollama
qwen3-vl:30b可选:
--plan 2、--model <名称>、LLM_BASE_URL=http://127.0.0.1:1234/v1目录
data/prompts/pipeline/refer-workflows/scripts/