Files
video-create/.claude/skills/image-generator/references/batch-mode.md
sion123 86b9b7948d feat(video-from-script): 重构工作流为子Agent分步执行并新增提示词模板系统
将视频制作工作流拆分为独立子步骤:分镜 → 图片提示词 → 生图 → 视频提示词 → 生视频 → 成片,每步由子Agent独立执行。引入prompts/目录统一管理提示词模板(分镜.md、图片提示词.md、视频提示词.md),通过account.json的storyboardPrompt/imageStylePrompt/videoStylePrompt字段引用。

变更内容:
- 新增confirmed机制和pipeline.js confirm命令,生图后必须人工确认才能继续
- manifest schema改用shotDesc/narration/duration/directorRef替代旧字段
- 文件命名规则从keyword改为slug(从shotDesc/narration派生)
- 删除旧的storyboard-rules.md和prompt-rules.md
- pipeline.js脚本拆分为lib/目录下的独立模块(cmd-init/cmd-confirm/cmd-validate/phase-*)
- 新增cmd-create-account支持一键创建带prompts目录的账号
- capcut_assemble支持narration字段替代text作为字幕源
- 新增.gitclaude/settings.json权限配置
2026-04-30 21:18:31 +08:00

92 lines
2.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 批量图片生产
## 流程
```dot
digraph batch_gen {
rankdir=LR
node [shape=box, style=filled, fillcolor="#f5f5f5", fontsize=11]
refs [label="参考图 references/\n+ 风格 styles/*.md", shape=folder, fillcolor="#e3f2fd"]
prompts [label="生成提示词\n每条文案→imagePrompt\n+ videoPrompt"]
model_gemini [label="Gemini edit()\n图生图参考图直传", fillcolor="#e8f5e9"]
model_mj [label="MJ --sref\n风格参考URL", fillcolor="#fff3e0"]
output [label="输出图片\n+ manifest.json"]
pick [label="人工挑选\n删除不合格变体", shape=diamond, fillcolor="#fff9c4"]
refs -> prompts
prompts -> model_gemini [label="快速/批量"]
prompts -> model_mj [label="精品/写实"]
model_gemini -> output
model_mj -> output
output -> pick
}
```
## 提示词生成
### 单图模式(默认)
每条文案生成 2 个 prompt
| 字段 | 用途 | 规则 |
|------|------|------|
| `imagePrompt` | 生图 | 英文,描述画面内容 |
| `videoPrompt` | 图生视频 | 描述**运动**zoom/pan/dolly不超过 50 词 |
### 首尾帧模式(用户指定时)
每条文案生成 3 个 prompt
| 字段 | 用途 | 规则 |
|------|------|------|
| `imagePrompt` | 起始帧 | 静止状态 |
| `lastFramePrompt` | 结束帧 | 同一场景的运动状态 |
| `videoPrompt` | 过渡视频 | "from X to Y" 格式 |
首尾帧原则:同一场景、视角一致、状态对比、光照连贯。
## 输出目录
```
output/{name}_{YYYYMMDD}_{NNN}/
├── manifest.json # 主清单(贯穿全流程)
├── images/ # scene_{NN}_{slug}.jpeg
├── videos/ # scene_{NN}_{slug}.mp4
└── audio/ # seg_001.mp3
```
命名:图片 `scene_01_悬浮.jpeg` → 视频 `scene_01_悬浮.mp4`slug 从 narration/shotDesc 派生,支持中文)
## manifest.json
字段规范详见 [manifest-schema.md](../../video-from-script/references/manifest-schema.md)。
## 命令速查
```bash
# Gemini 图生图(推荐,本地图直传)
node scripts/gemini-image-generator.js edit "prompt" -i ./references/ref1.png -o ./output -r 9:16
# Pipeline 批量生图(推荐)
node scripts/pipeline.js init \
--account {account} --mode single \
--items '[{"shotDesc":"...","narration":"...","duration":5,"imagePrompt":"...","directorRef":"tarantino"}]'
node scripts/pipeline.js run \
--manifest ./output/{account}_XXXXXXXX_001/manifest.json \
--phase images
# MJ 带参考图(需先上传 OSS
node scripts/oss-upload.js ./references/ref1.png
node scripts/mj-image-generator.js "prompt --sref URL --sw 200" -o ./output -a 9:16
# Gemini 纯文生图(无参考图时)
node scripts/gemini-image-generator.js generate "prompt" -o ./output -r 9:16
```
## 质量检查
- 画幅比例正确9:16/16:9
- manifest.json 与实际文件一一对应
- 生成数量与文案数量匹配