Reorganize skills package structure
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
N宫格分镜故事板生成器。根据用户提供的故事文档或描述,先拆解为逐镜头分镜表,
|
||||
再调用 AI 生成 N 宫格故事板图片。
|
||||
支持读取剧本文档(docx/txt)自动拆解镜头,也支持用户直接输入故事描述。
|
||||
支持 2x2、3x3、4x4、5x5 等网格布局,每格画面比例可自定义(默认 16:9)。
|
||||
触发词包括:分镜、故事板、storyboard、N宫格、九宫格、四宫格、网格分镜、
|
||||
分镜拆解、镜头拆解、shot breakdown、画分镜、帮我拆镜头、
|
||||
make a storyboard、visual script。
|
||||
不适用于:完整纪录片/科普片视频生成(使用 documentary skill)、
|
||||
角色三视图/四视图/表情包(使用 film-tv skill)、视频剪辑合成。
|
||||
@@ -0,0 +1,164 @@
|
||||
---
|
||||
name: storyboard
|
||||
display-name-zh: 分镜板
|
||||
version: 1.0.2
|
||||
description: |
|
||||
N宫格分镜故事板生成器。根据用户提供的故事文档或描述,先拆解为逐镜头分镜表,
|
||||
再调用 AI 生成 N 宫格故事板图片。
|
||||
支持读取剧本文档(docx/txt)自动拆解镜头,也支持用户直接输入故事描述。
|
||||
支持 2x2、3x3、4x4、5x5 等网格布局,每格画面比例可自定义(默认 16:9)。
|
||||
触发词包括:分镜、故事板、storyboard、N宫格、九宫格、四宫格、网格分镜、
|
||||
分镜拆解、镜头拆解、shot breakdown、画分镜、帮我拆镜头、
|
||||
make a storyboard、visual script。
|
||||
不适用于:完整纪录片/科普片视频生成(使用 documentary skill)、
|
||||
角色三视图/四视图/表情包(使用 film-tv skill)、视频剪辑合成。
|
||||
summary-cn: 输入剧本,生成分镜表和 N 宫格故事板
|
||||
summary-en: Turn script into N-grid storyboards
|
||||
tags: [Image, Shot-List, AI-Image]
|
||||
tags-cn: [图片, 镜头表, AI图像]
|
||||
exported-by: MiniMax-hub
|
||||
---
|
||||
|
||||
# N宫格分镜故事板
|
||||
|
||||
将故事或剧本拆解为逐镜头分镜表,生成 N 宫格故事板图片。
|
||||
|
||||
## STEP 1: 收集故事来源
|
||||
|
||||
从用户消息中判断故事输入方式:
|
||||
|
||||
1. **文档输入** — 用户提供了 docx/txt 等剧本文档 → 读取文档内容
|
||||
2. **直接输入** — 用户直接在对话中描述故事 → 直接使用
|
||||
|
||||
如果用户提供了文档,读取后给出 3 个选择:
|
||||
|
||||
| 选项 | 说明 |
|
||||
|------|------|
|
||||
| 前 9 个镜头 · 3x3 | 从剧情开头挑选前 ~9 个关键镜头,生成 3x3 九宫格 |
|
||||
| 前 16 个镜头 · 4x4 | 从剧情开头挑选前 ~16 个关键镜头,生成 4x4 十六宫格 |
|
||||
| 用户选一集 · 自动挑镜头 | 用户指定某一集/章节,由 AI 挑选核心镜头 |
|
||||
|
||||
如果用户直接输入故事(非文档),询问:
|
||||
- **网格尺寸**:2x2 / 3x3 / 4x4 / 5x5(默认 3x3)
|
||||
- **画面比例**:每格的宽高比(默认 16:9)
|
||||
|
||||
## STEP 2: 分镜拆解(镜头表)
|
||||
|
||||
根据选定的故事内容,拆解为逐镜头分镜表,以 Markdown 表格呈现。
|
||||
|
||||
**分镜表格式**:
|
||||
|
||||
| Shot | 景别 | 画面描述 | 对应剧本台词 |
|
||||
|:---:|:---:|---|---|
|
||||
| 1 | 全景 / 特写 / 中景 / 近景 等 | 角色位置(含方位 N/S/E/W)、姿态、服装、动作、光影 | 角色(情绪):"台词" 或 无 |
|
||||
|
||||
**拆解规则**:
|
||||
|
||||
1. **景别标注** — 每个镜头标注景别(全景 / 中景 / 中近景 / 近景 / 特写),可附加运镜说明(仰拍 / 俯拍 / 固定 / 推 / 拉)
|
||||
2. **空间方位** — 角色位置使用方位标注(E/W/S/N),描述朝向和相对位置关系
|
||||
3. **空镜规则** — 场景转换或环境交代时,先给一个空镜(台词为"无")建立空间感,因为单张图片无法同时传递环境信息和人物互动,分开处理可让每个镜头职责明确
|
||||
4. **服装与状态** — 首次出现的角色完整描述服装外观;后续镜头如有状态变化则标注叠加状态
|
||||
5. **光影描述** — 每个镜头包含光线/环境氛围描述
|
||||
6. **台词格式** — `角色(情绪标注):"台词内容"` 或 `无`(空镜 / 纯动作镜头)
|
||||
|
||||
拆解完成后,将分镜表以 Markdown 表格写入画布文本节点,展示给用户确认。
|
||||
|
||||
**⏸ 等待用户确认分镜表后再继续。**
|
||||
|
||||
## STEP 3: 询问参考素材
|
||||
|
||||
生成故事板图片之前,询问用户是否有参考素材(允许多选):
|
||||
|
||||
| 素材类型 | 说明 | 用途 |
|
||||
|----------|------|------|
|
||||
| 参考图 | 风格参考、氛围参考、画风参考 | 控制整体视觉风格、色调、画风 |
|
||||
| 角色参考 | 角色立绘、角色照片、角色四视图 | 保持角色外观一致性 |
|
||||
| 场景参考 | 场景概念图、实拍场景照片 | 保持场景环境一致性 |
|
||||
| 无参考素材 | 让 AI 自由发挥风格 | — |
|
||||
|
||||
如果用户提供了参考素材:
|
||||
- 从画布获取或从用户上传的文件路径获取
|
||||
- 使用 `read_media` 分析参考素材的视觉特征,提取风格关键词
|
||||
- 所有参考素材的文件路径传递给后续生成步骤
|
||||
|
||||
## STEP 4: 生成分镜提示词
|
||||
|
||||
调用 `text_generation` 工具,将 STEP 2 的分镜表 + STEP 3 的参考素材分析结果输入,生成结构化分镜 JSON。
|
||||
|
||||
System Prompt 模板见 → `references/panel-prompt-system.md`
|
||||
|
||||
**调用参数**:
|
||||
- `model`: `gemini-2.5-pro`
|
||||
- `prompt`: 将分镜表填入模板的 `{{prompt}}`,网格设置 JSON 填入 `{{grid_setting}}`
|
||||
- `images`: 如有参考素材,传入参考图路径列表
|
||||
- `response_format`: `json_object`
|
||||
|
||||
返回的 JSON 包含 `panels`(每格描述)和 `overall_prompt`(整体合成 prompt)。
|
||||
|
||||
## STEP 5: 生成 N 宫格故事板图片
|
||||
|
||||
从 STEP 4 返回的 JSON 中提取 `overall_prompt` 字段,调用 `nano_banana_image_generation` 生成故事板图片。
|
||||
|
||||
**指定模型**:`nano_banana_2`(Gemini 3 Pro,网格图质量最佳,当前唯一可靠生成多格分镜的模型)。
|
||||
|
||||
**Prompt 构造**:在 `overall_prompt` 前加上网格布局指令:
|
||||
|
||||
```
|
||||
Generate a {rows}x{cols} grid storyboard image. The grid has {rows} rows and {cols} columns. Each cell represents a sequential scene panel with {cell_ratio} aspect ratio. Arrange the panels left-to-right, top-to-bottom. Add thin white borders between panels for clear separation.
|
||||
|
||||
{overall_prompt}
|
||||
```
|
||||
|
||||
**参数**:
|
||||
- `model`: `nano_banana_2`
|
||||
- `reference_images`: 传入用户的参考图(如有)
|
||||
- `aspect_ratio`: 根据网格和 cell_ratio 计算(同行列数网格的整体比例 = 单格比例)
|
||||
- `resolution`: `high`(高分辨率,确保每格细节清晰)
|
||||
|
||||
**比例计算参考**:
|
||||
|
||||
| 网格 | 单格比例 | 整体比例 |
|
||||
|------|----------|----------|
|
||||
| NxN (2x2/3x3/4x4/5x5) | 16:9 | 16:9 |
|
||||
| NxN | 9:16 | 9:16 |
|
||||
| NxN | 1:1 | 1:1 |
|
||||
|
||||
> 同比例网格,整体比例 = 单格比例。当行列数不同时(如 2x3),需单独计算。
|
||||
|
||||
## STEP 6: 输出结果
|
||||
|
||||
向用户展示三部分内容:
|
||||
|
||||
1. **分镜拆解表** — STEP 2 生成的镜头表格(已在画布上)
|
||||
2. **分镜提示词** — STEP 4 生成的 JSON,格式化展示 style_profile 和每个 panel 的描述
|
||||
3. **N 宫格故事板图片** — STEP 5 生成的图片
|
||||
|
||||
展示格式:
|
||||
|
||||
```
|
||||
## 分镜故事板
|
||||
|
||||
### 风格分析
|
||||
{reference_analysis}
|
||||
|
||||
### 统一风格
|
||||
{style_profile}
|
||||
|
||||
### 分镜描述
|
||||
| 位置 | 描述 |
|
||||
|------|------|
|
||||
| (0,0) | {panel_description} |
|
||||
| (0,1) | {panel_description} |
|
||||
| ... | ... |
|
||||
|
||||
### 故事板图片
|
||||
[生成的 N 宫格图片]
|
||||
```
|
||||
|
||||
## 注意事项
|
||||
|
||||
- 所有 AI 生成的 prompt 使用英文,用户交互使用中文
|
||||
- 参考图是风格的最高权威 — 分镜内容需适配参考图的风格,因为保持视觉一致性是故事板的核心价值
|
||||
- 角色参考图是角色外观的最高权威 — 所有包含该角色的 panel 与参考一致,以确保观众能跨镜头识别同一角色
|
||||
- 每个 panel description 自包含,可独立作为图片生成 prompt
|
||||
- 空镜在 panel description 中侧重环境氛围描写
|
||||
@@ -0,0 +1,90 @@
|
||||
# Panel Prompt System Prompt Template
|
||||
|
||||
Below is the system prompt template for generating structured panel descriptions from a shot breakdown table.
|
||||
|
||||
Placeholders:
|
||||
- `{{grid_setting}}` — JSON object with `rows`, `cols`, `cell_ratio`
|
||||
- `{{prompt}}` — The shot breakdown table from STEP 2
|
||||
|
||||
---
|
||||
|
||||
```
|
||||
You are an expert storyboard artist and visual reference analyzer. You will receive a shot breakdown table, a grid setting (JSON), and optionally one or more reference images.
|
||||
|
||||
Grid Setting (JSON):
|
||||
{{grid_setting}}
|
||||
|
||||
The grid setting contains: rows (number of rows), cols (number of columns), cell_ratio (aspect ratio of each cell like "16:9").
|
||||
Your task: Convert each shot from the breakdown table into a panel description, ordered left-to-right, top-to-bottom. Total panels = rows x cols.
|
||||
|
||||
---
|
||||
|
||||
RULES FOR REFERENCE IMAGES
|
||||
|
||||
If reference images are provided, follow these steps:
|
||||
|
||||
Step A — Analyze ALL Reference Images in Detail
|
||||
For each reference image, extract:
|
||||
- Main subjects and objects (what exactly is depicted)
|
||||
- Art style (realistic, cartoon, illustration, oil painting, photography, watercolor, anime, pixel art, etc.)
|
||||
- Color palette and dominant tones (warm/cool, muted/vibrant, specific key colors)
|
||||
- Composition and framing techniques
|
||||
- Lighting characteristics (direction, quality, softness, warmth)
|
||||
- Texture and material qualities (smooth, rough, glossy, matte)
|
||||
- Overall mood and atmosphere (serene, dramatic, playful, dark, whimsical)
|
||||
|
||||
Step B — Extract Unified Style Profile
|
||||
If multiple reference images are provided:
|
||||
- Identify shared visual elements across images (common subjects, recurring motifs, shared objects)
|
||||
- Determine the common art style or find the style that best unifies them
|
||||
- Extract the common color palette that spans all references
|
||||
- Determine shared mood and atmosphere
|
||||
- Build a single unified "style profile" that captures the essence of ALL reference images
|
||||
- This merged profile becomes the binding constraint for every panel
|
||||
|
||||
If only one reference image is provided:
|
||||
- The single image's content, style, subjects, colors, and mood become the binding constraint
|
||||
|
||||
Step C — Reconcile Shot Breakdown with Reference Images
|
||||
Reference images are the primary authority on visual style — the shot breakdown defines narrative content, but the visual language comes from references.
|
||||
|
||||
- Preserve the art style, color palette, lighting, and mood from the reference images
|
||||
- Character references: every panel featuring that character should match the reference appearance
|
||||
- Scene references: every panel in that scene should match the reference environment
|
||||
- Style references: all panels should follow the reference's visual language
|
||||
|
||||
Step D — Generate Panel Descriptions
|
||||
Each panel description should:
|
||||
1. Be a concise, vivid visual description suitable as an image generation prompt
|
||||
2. Maintain the visual style, color palette, lighting, and mood from reference images
|
||||
3. Faithfully represent the shot breakdown's shot type, character positions, actions, and lighting
|
||||
4. Include explicit style anchors when references exist
|
||||
5. Be written in English
|
||||
6. Be self-contained (each panel works independently as an image prompt)
|
||||
|
||||
---
|
||||
|
||||
IF NO REFERENCE IMAGES ARE PROVIDED
|
||||
|
||||
Generate panel descriptions purely based on the shot breakdown:
|
||||
1. Choose an appropriate and consistent visual style across all panels
|
||||
2. Maintain coherent characters, settings, and color palette throughout
|
||||
3. Each panel should capture the exact moment described in the shot breakdown
|
||||
|
||||
Shot Breakdown:
|
||||
{{prompt}}
|
||||
|
||||
Output Format:
|
||||
Return a strict JSON object:
|
||||
{
|
||||
"reference_analysis": "Detailed analysis of all reference images including subjects, style, colors, mood (or 'No reference images provided')",
|
||||
"style_profile": "The unified style profile that all panels follow",
|
||||
"reconciliation_strategy": "How the shot breakdown is adapted to match reference image style",
|
||||
"panels": [
|
||||
{"row": 0, "col": 0, "description": "Panel description for position (0,0)"},
|
||||
{"row": 0, "col": 1, "description": "Panel description for position (0,1)"},
|
||||
...
|
||||
],
|
||||
"overall_prompt": "A combined prompt that describes the entire grid image with all panels, following the reference image style and content. This prompt instructs the model to generate all panels in a single grid image following the template structure. Each cell matches the cell_ratio aspect ratio. Explicitly references the style and content anchors from the reference images."
|
||||
}
|
||||
```
|
||||
Binary file not shown.
Reference in New Issue
Block a user