Files
video-create/.claude/skills/image-generator/references/batch-mode.md
sion123 c0b05c85c3 feat(image-generator, video-from-script): 优化质量检查项,移除不适用条件
- 移除图片水印、字幕覆盖等视频素材级质量检查,改为 Agent 可自动化验证的检查项
- 将输出目录命名从 `{account}` 改为 `{name}`,与账号体系文档对齐
- 废弃 account.json 中已不再使用的 `pipeline` 字段
- 风格文件命名从英文改为中文,更直观易识别
2026-04-30 01:17:52 +08:00

92 lines
2.8 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}_{keyword}.jpeg
├── videos/ # scene_{NN}_{keyword}.mp4
└── audio/ # seg_001.mp3
```
命名:图片 `scene_01_悬浮.jpeg` → 视频 `scene_01_悬浮.mp4`keyword 支持中文)
## 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 '[{"text":"...","imagePrompt":"...","keyword":"关键词"}]'
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 与实际文件一一对应
- 生成数量与文案数量匹配