目录

video-gen

SEN 教学视频生成流水线:剧本 → 结构化场景 → ComfyUI 工作流 → 视频。

第一阶段

步骤 1:拆解角色

python3 scripts/extract_characters.py --plan 1

输出:data/parsed/story_001_characters.json

步骤 2:拆解场景

python3 scripts/extract_scenes.py --plan 1

输出:data/parsed/story_001_scenes.json(含 locations 场景参考图 prompt + scenes 分场信息)

步骤 3:生成角色/场景参考图

# 默认:全部 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.jsonstory_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/ 给本地 LLM 的系统提示词
pipeline/ 核心逻辑
refer-workflows/ 已验证的 ComfyUI 工作流
scripts/ 命令行入口
关于
24.1 MB
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9 京公网安备 11010802047560号