Micro-Drama Agent 是一个将“用户故事/剧情梗概”自动转化为“角色一致的短剧视频内容”的多阶段 Agent 工作流。它把长链路的视频生成拆解为可控、可复用、可调试的原子环节:剧情理解与结构化规划(上游 Agent)+ 生成执行(下游工具/模型),并通过统一的 JSON Schema 在各阶段之间传递标准化数据,从而降低信息幻觉、提升链路稳定性与执行确定性。
本仓库聚焦于当前可运行的工程代码与演示资产。体积巨大的本地模型权重默认不纳入版本控制(见 .gitignore)。
整体链路以阶段化方式运行:
--user_story(自然语言故事)或 --script_path(已有剧情 synopsis JSON)。Step_0_character_profiles.json,沉淀可复用的角色身份/服饰信息。CharaConsist 主要用于“根据文字 Profile 生成角色多角度参考资产 / 构建 CharacterBank”,它不是最终镜头图像生成的主流程模型。InstantCharacter 在镜头级首帧生成时执行“角色身份注入”(把 CharacterBank 的参考身份稳定注入到指定 bbox 区域),以保证跨镜头/跨场景一致性。HunyuanVideo_I2V / CogVideoX 等)得到分镜视频片段,并可选拼接为最终视频。Character reference example:
Generated examples:
Other Video Demos
Micro-Drama Agent/
├── microdrama_agent/ # 主流程代码(Agent 编排 + 工具调用)
├── imgutils-main/ # 图像工具/依赖(工程内 vendored 版本)
├── show/ # README 展示用资产
├── requirements.txt # Python 依赖
└── .gitignore # 忽略本地权重/缓存/运行产物
创建 Python 环境并安装依赖:
pip install -r requirements.txt
如果想直接使用捆绑的图像工具源代码,请保留 imgutils-main/ 目录。
python microdrama_agent/run.py \
--user_story "A short emotional reunion story between two old friends." \
--character_photo_path ./characters \
--LLM deepseek-v3 \
--gen_model InstantCharacter \
--Image2Video CogVideoX
python microdrama_agent/run.py \
--script_path ./path/to/story.json \
--character_photo_path ./characters \
--gen_model InstantCharacter \
--Image2Video HunyuanVideo_I2V
python microdrama_agent/run.py \
--script_path ./path/to/story.json \
--character_photo_path ./characters \
--gen_model InstantCharacter \
--images_only
--user_story: natural-language story input.--script_path: path to a prepared synopsis JSON.--character_photo_path: reference character image folder.--gen_model: keyframe generation backend.--Image2Video: video generation backend.--images_only: generate keyframes only, skip video rendering.--resume: reuse existing intermediate stage outputs.--start_from: resume from script, scene, shot, video, or final.--only: run a specific shot, such as "Scene 2,Shot 1"..gitignore)。microdrama_agent/models/ 下的本地路径(如已放置)。This project integrates multiple open-source components and model backends to build a practical micro-drama generation workflow.
Micro-Drama Agent 是一个将“用户故事/剧情梗概”自动转化为“角色一致的短剧视频内容”的多阶段 Agent 工作流。它把长链路的视频生成拆解为可控、可复用、可调试的原子环节:剧情理解与结构化规划(上游 Agent)+ 生成执行(下游工具/模型),并通过统一的 JSON Schema 在各阶段之间传递标准化数据,从而降低信息幻觉、提升链路稳定性与执行确定性。
本仓库聚焦于当前可运行的工程代码与演示资产。体积巨大的本地模型权重默认不纳入版本控制(见 .gitignore)。
整体链路以阶段化方式运行:
--user_story(自然语言故事)或 --script_path(已有剧情 synopsis JSON)。Step_0_character_profiles.json,沉淀可复用的角色身份/服饰信息。CharaConsist 主要用于“根据文字 Profile 生成角色多角度参考资产 / 构建 CharacterBank”,它不是最终镜头图像生成的主流程模型。InstantCharacter 在镜头级首帧生成时执行“角色身份注入”(把 CharacterBank 的参考身份稳定注入到指定 bbox 区域),以保证跨镜头/跨场景一致性。HunyuanVideo_I2V / CogVideoX 等)得到分镜视频片段,并可选拼接为最终视频。Character reference example:
Generated examples:
Other Video Demos
Micro-Drama Agent/
├── microdrama_agent/ # 主流程代码(Agent 编排 + 工具调用)
├── imgutils-main/ # 图像工具/依赖(工程内 vendored 版本)
├── show/ # README 展示用资产
├── requirements.txt # Python 依赖
└── .gitignore # 忽略本地权重/缓存/运行产物
创建 Python 环境并安装依赖:
pip install -r requirements.txt
如果想直接使用捆绑的图像工具源代码,请保留 imgutils-main/ 目录。
python microdrama_agent/run.py \
--user_story "A short emotional reunion story between two old friends." \
--character_photo_path ./characters \
--LLM deepseek-v3 \
--gen_model InstantCharacter \
--Image2Video CogVideoX
python microdrama_agent/run.py \
--script_path ./path/to/story.json \
--character_photo_path ./characters \
--gen_model InstantCharacter \
--Image2Video HunyuanVideo_I2V
python microdrama_agent/run.py \
--script_path ./path/to/story.json \
--character_photo_path ./characters \
--gen_model InstantCharacter \
--images_only
--user_story: natural-language story input.--script_path: path to a prepared synopsis JSON.--character_photo_path: reference character image folder.--gen_model: keyframe generation backend.--Image2Video: video generation backend.--images_only: generate keyframes only, skip video rendering.--resume: reuse existing intermediate stage outputs.--start_from: resume from script, scene, shot, video, or final.--only: run a specific shot, such as "Scene 2,Shot 1"..gitignore)。microdrama_agent/models/ 下的本地路径(如已放置)。This project integrates multiple open-source components and model backends to build a practical micro-drama generation workflow.