SuperAPI AI Directory

story-to-scenes

Design & creation

View repository

Updated 10-16 06:48

About this skill

Story To Scenes

Long-text shot-splitting batch image generation engine, used to intelligently split long texts such as stories, teaching courses, and comic strip scripts into scenes, and batch-generate illustrations with a unified style and consistent characters.

Core workflow

输入长文本 → 角色提取 → 生成角色胚子图 → 确认锁定
                              ↓
         智能拆镜 → 场景清单 → 确认调整
                              ↓
         风格胚子图(第一张场景)→ 确认锁定
                              ↓
         场景胚子图(复用场景,可选)→ 确认锁定
                              ↓
         批量生成场景图(引用胚子)→ 输出图集

Iron rules

  1. Single-image principle: Generate an independent single image for each scene/character; multi-panel collages, storyboard frames, and bordered combinations are prohibited
  2. Characters before scenes: Character seeds must be generated and locked before scene image generation
  3. Lock only after confirmation: Character seeds and style seeds are considered locked only after user confirmation
  4. Reference generation: When locked characters appear in a scene, their seed images must be referenced
  5. Prompt recording: The complete prompt for each image must be recorded for easy reuse and fine-tuning
  6. Progress persistence: Save progress in real time during generation, support resuming from breakpoints

Detailed steps

Step 1: Project initialization

Collect basic project information:

project_name: ""           # 项目名称(必填)
style_preset: ""           # 预设风格或自定义描述
aspect_ratio: "3:4"        # 尺寸:3:4 / 16:9 / 1:1
source_text: ""            # 原文内容或文件路径

Create project directory:

assets/generated/{项目名}/
├── characters/            # 角色胚子图
├── locations/             # 场景胚子图
├── scenes/                # 场景配图
├── characters.md          # 角色索引
├── progress.json          # 生成进度
└── gallery.md             # 完整图集索引

Step 2: Text parsing and character extraction

  1. Automatically identify text type: story/course/script/comic strip
  2. Split scenes semantically (not mechanically by paragraph)
  3. Extract all people/animals/creatures and generate a character list table

Character list table output format:

Character name Type Appearance features Personality tags Appearing scenes
Example Person/animal Detailed appearance description Personality keywords 1,2,3

Interaction point: Show the list, let the user supplement/correct character descriptions, and proceed to the next step after confirmation.: Show the list, let the user supplement/correct character descriptions, and proceed to the next step after confirmation.

Step 3: Generate character seed images

Generate a standard character portrait for each character:

  • Composition requirements: Front view or three-quarter side view, clean solid-color background
  • Image requirements: Single image, highlight the character's own features, multi-angle collage is prohibited
  • Naming convention:{项目名}_char_{角色名}.png
  • Storage location:assets/generated/{项目名}/characters/

Image generation prompt structure:

[风格关键词], single character portrait of [角色描述], 
[姿态], clean solid [背景色] background, 
full body shot, character design sheet style,
--no multiple views, turnaround, collage, grid, panels, border

Interaction point: Show character seed images one by one; after the user confirms "OK", lock them; if dissatisfied, regenerate.: Show character seed images one by one; after the user confirms "OK", lock them; if dissatisfied, regenerate.

Write the confirmed character information into characters.md:

# 角色索引

## {角色名}
- **胚子图**:characters/{角色名}.png
- **外貌描述**:{详细外貌}
- **出场场景**:{场景序号列表}

Step 4: Intelligent shot splitting

Divide scenes according to text semantics and generate a scene list table:

No. Scene name Image description Characters appearing Shot type Emotional atmosphere
01 Scene name Specific image content Character list Long shot/medium shot/close-up Emotion keywords

Shot type description:

  • Long shot: Establishes the environment, characters are smaller
  • Medium shot: Characters are shown half-body or full-body, with the subject prominent
  • Close-up: facial expressions or key item details

Interaction point: Display the shot breakdown table, allowing the user to adjust scene divisions and shot selections, and proceed to the next step after confirmation.

Step 5: Generate style draft image

Generate using the first scenestyle-setting image:

  1. Build the prompt according to the user-selected style preset (or custom description)
  2. Generate the first scene image
  3. Show it to the user for confirmation

Interaction point:

  • Confirm OK → extract style keywords, record to progress.json, reuse throughout
  • Not satisfied → adjust the style description and regenerate

Step 6: Scene draft image (optional)

Identify in the textimportant scenes that appear repeatedly, such as:

  • the protagonist's home
  • important landmark buildings
  • places that appear repeatedly

Generate environment images separately for these scenes:

  • Composition requirements: no characters, pure scene environment
  • Storage location:assets/generated/{项目名}/locations/
  • Naming convention:{场景名}.png

Interaction point: Display the scene draft image, confirm or skip.

Step 7: Batch generate scene images

Generate illustrations scene by scene, usingimage-to-imageto ensure character consistency.

Single-character scenes

Directly perform image-to-image based on that character's draft image:

python image_to_image.py "characters/角色A.png" "场景描述,保持角色形象..." -o "scenes/scene_xx.png"

Multi-character scenes (serial replacement rule)

When a scene contains multiple characters, mustreplace serially one by one, gradually locking in each character:

步骤1:基于角色A胚子图 + 场景描述 → 生成 role1.png(角色A锁定,其他角色可能不一致)
步骤2:基于角色B胚子图 + role1.png → 生成 role2.png(角色A+B锁定)
步骤3:基于角色C胚子图 + role2.png → 生成 role3.png(角色A+B+C锁定)
...依此类推,直到所有角色都替换完成
最终输出:role{n}.png 作为该场景的最终图

Execution example(3-character scene):

# 第1轮:锁定孙悟空
python image_to_image.py "characters/孙悟空.png" "场景描述,孙悟空xxx,唐僧xxx,猪八戒xxx..." -o "scenes/scene_xx_role1.png"

# 第2轮:基于role1锁定唐僧
python image_to_image.py "characters/唐僧.png" "保持场景和其他角色,替换唐僧形象与参考图一致" --ref "scenes/scene_xx_role1.png" -o "scenes/scene_xx_role2.png"

# 第3轮:基于role2锁定猪八戒
python image_to_image.py "characters/猪八戒.png" "保持场景和其他角色,替换猪八戒形象与参考图一致" --ref "scenes/scene_xx_role2.png" -o "scenes/scene_xx_role3.png"

# 最终重命名
mv "scenes/scene_xx_role3.png" "scenes/scene_xx_场景名.png"
# 清理中间文件
rm "scenes/scene_xx_role1.png" "scenes/scene_xx_role2.png"

Character replacement order: sort from largest to smallest by importance or screen share

Prompt specification

Prompt structure:

[风格关键词], [场景描述], 
[角色A描述], [角色B描述],
[镜头构图], [情绪氛围],
--no multiple panels, comic layout, grid, collage, split frame, border, manga panels, text, caption, title, subtitle, watermark, signature, letters, words, writing

Iron rule:

  • Prohibit outputting any text, titles, watermarks, or signatures
  • Exclusion terms must include text, caption, title, subtitle, watermark, signature, letters, words, writing

Naming convention:scene_{序号}_{场景名}.png Storage location:assets/generated/{项目名}/scenes/

Progress tracking:

  • After each image is generated, update progress.json
  • Automatically retry on failure (up to 3 times)

Step 8: Output organization

After generation is complete, create the atlas index document gallery.md:

# {项目名} 场景图集

## 项目信息
- **风格**:{风格描述}
- **尺寸**:{尺寸}
- **场景数**:{总数}
- **生成日期**:{日期}

## 角色一览
| 角色 | 胚子图 |
|------|--------|
| {角色名} | ![[characters/{角色名}.png]] |

## 场景图集

### Scene 01:{场景名}
![[scenes/scene_01_{场景名}.png]]
> {场景描述}

<details>
<summary>提示词</summary>
{完整提示词}
</details>

Special operation commands

Command Description
重新生成 {角色名} Regenerate the specified character draft image
重新生成 scene_{序号} Regenerate the specified scene image
从 scene_{序号} 继续 Resume from a checkpoint, continue from the specified scene
更换风格 Reselect the style; the style draft must be regenerated
导出图集 Generate the final index document

Preset styles

You can choose the following preset styles, or provide a custom style description:

Japanese healing picture book

soft watercolor illustration, warm pastel colors, gentle lighting, 
Studio Ghibli inspired, dreamy atmosphere, delicate linework

Chinese-style ink wash light color

traditional Chinese ink wash painting, subtle watercolor tints,
elegant brushwork, Song dynasty aesthetic, zen atmosphere

European and American children's illustration

vibrant children's book illustration, bold colors, expressive characters,
playful style, Pixar-inspired, warm and inviting

Cyberpunk

cyberpunk aesthetic, neon lights, dark atmosphere, 
high contrast, futuristic cityscape, Blade Runner inspired

Flat vector style

flat vector illustration, clean geometric shapes, 
modern minimalist, limited color palette, graphic design style

Watercolor hand-drawn style

traditional watercolor painting, visible brush strokes,
organic textures, artistic imperfections, soft edges

File structure

Complete directory structure of the generated project:

assets/generated/{项目名}/
├── characters/              # 角色胚子图
│   ├── {角色A}.png
│   └── {角色B}.png
├── locations/               # 场景胚子图(可选)
│   └── {场景名}.png
├── scenes/                  # 场景配图
│   ├── scene_01_{场景名}.png
│   ├── scene_02_{场景名}.png
│   └── ...
├── characters.md            # 角色索引表
├── progress.json            # 生成进度
└── gallery.md               # 完整图集索引

Dependent skills

  • image-service: actual image generation execution
  • obsidian-markdown: generate index document (optional)

References

  • references/prompt_templates.md: prompt template library
  • references/style_presets.md: style preset details

Assets

  • assets/templates/gallery_template.md: atlas index template
  • assets/templates/characters_template.md: Character Index Template