manga-drama

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

漫剧生成器

Manga Drama Generator

基于 Seedance 视频生成能力,专门用于创作漫画风格的短剧(漫剧)。
Powered by Seedance video generation capabilities, it is specially designed for creating comic-style short dramas (manga dramas).

核心功能

Core Features

  • 主角识别:分析提供的角色图片,提取角色特征
  • 自动分镜:根据主题自动生成漫剧分镜脚本
  • 图生视频:以主角图片为基础生成各分镜视频
  • 漫画风格:内置漫画风格提示词模板
  • 分镜管理:支持自定义分镜脚本
  • Protagonist Recognition: Analyze the provided character image and extract character features
  • Automatic Storyboarding: Automatically generate manga drama storyboard scripts based on the theme
  • Image to Video: Generate videos for each storyboard based on the protagonist's image
  • Comic Style: Built-in comic style prompt template
  • Storyboard Management: Support custom storyboard scripts

前置要求

Prerequisites

需要设置
ARK_API_KEY
环境变量。
You need to set the
ARK_API_KEY
environment variable.

配置方式(推荐)

Configuration Method (Recommended)

  1. 复制配置模板:
bash
cp .canghe-skills/.env.example .canghe-skills/.env
  1. 编辑
    .canghe-skills/.env
    文件,填写你的 API Key:
ARK_API_KEY=your-actual-api-key-here
  1. Copy the configuration template:
bash
cp .canghe-skills/.env.example .canghe-skills/.env
  1. Edit the
    .canghe-skills/.env
    file and fill in your API Key:
ARK_API_KEY=your-actual-api-key-here

或使用环境变量

Or Use Environment Variables

bash
export ARK_API_KEY="your-api-key"
bash
export ARK_API_KEY="your-api-key"

加载优先级

Loading Priority

  1. 系统环境变量 (
    process.env
    )
  2. 当前目录
    .canghe-skills/.env
  3. 用户主目录
    ~/.canghe-skills/.env

需要依赖技能:seedance-video-generation
  1. System environment variables (
    process.env
    )
  2. Current directory
    .canghe-skills/.env
  3. User home directory
    ~/.canghe-skills/.env

Required dependent skill: seedance-video-generation

使用方法

Usage

1. 快速生成漫剧(推荐)

1. Quick Generate Manga Drama (Recommended)

提供主角图片和主题,自动生成完整漫剧:
bash
cd ~/.openclaw/workspace/skills/manga-drama
python3 scripts/manga_drama.py generate \
  --image /path/to/character.png \
  --theme "校园日常" \
  --scenes 3 \
  --send-feishu
Provide the protagonist image and theme to automatically generate a complete manga drama:
bash
cd ~/.openclaw/workspace/skills/manga-drama
python3 scripts/manga_drama.py generate \
  --image /path/to/character.png \
  --theme "校园日常" \
  --scenes 3 \
  --send-feishu

2. 根据脚本生成漫剧

2. Generate Manga Drama from Script

先创建脚本,再生成视频:
bash
undefined
Create a script first, then generate the video:
bash
undefined

创建脚本模板

Create script template

python3 scripts/manga_drama.py create-script
--output my_drama.json
--title "我的漫剧"
--character "双马尾女孩"
--num-scenes 4
python3 scripts/manga_drama.py create-script
--output my_drama.json
--title "我的漫剧"
--character "双马尾女孩"
--num-scenes 4

编辑脚本文件后生成

Generate after editing the script file

python3 scripts/manga_drama.py from-script
--script my_drama.json
--image /path/to/character.png
--send-feishu
undefined
python3 scripts/manga_drama.py from-script
--script my_drama.json
--image /path/to/character.png
--send-feishu
undefined

分镜模板

Storyboard Templates

内置5种漫剧分镜类型:
分镜类型名称说明
introduction主角登场介绍主角,展示角色特征
action动作场景主角进行某个动作
emotion情感表达表达某种情感
interaction互动场景与环境或其他元素互动
ending结尾定格漫剧结尾,定格画面
5 built-in manga drama storyboard types:
Storyboard TypeNameDescription
introductionProtagonist AppearanceIntroduce the protagonist and display character features
actionAction SceneThe protagonist performs a certain action
emotionEmotional ExpressionExpress a certain emotion
interactionInteraction SceneInteract with the environment or other elements
endingEnding Freeze FrameManga drama ending, freeze the frame

脚本格式

Script Format

json
{
  "title": "漫剧标题",
  "character": "主角描述",
  "style": "漫画风格",
  "total_scenes": 3,
  "scenes": [
    {
      "scene_number": 1,
      "type": "introduction",
      "name": "主角登场",
      "prompt": "双马尾女孩站在画面中央,微笑看向镜头,漫画风格...",
      "duration": 5,
      "ratio": "9:16",
      "resolution": "1080p"
    }
  ]
}
json
{
  "title": "漫剧标题",
  "character": "主角描述",
  "style": "漫画风格",
  "total_scenes": 3,
  "scenes": [
    {
      "scene_number": 1,
      "type": "introduction",
      "name": "主角登场",
      "prompt": "双马尾女孩站在画面中央,微笑看向镜头,漫画风格...",
      "duration": 5,
      "ratio": "9:16",
      "resolution": "1080p"
    }
  ]
}

参数说明

Parameter Description

generate 命令

generate Command

参数必需说明
--image
主角图片路径
--theme
漫剧主题/剧情描述
--scenes
分镜数量(默认3)
--output
输出目录(默认~/Desktop)
--send-feishu
发送到飞书
ParameterRequiredDescription
--image
Protagonist image path
--theme
Manga drama theme/plot description
--scenes
Number of storyboards (default 3)
--output
Output directory (default ~/Desktop)
--send-feishu
Send to Feishu

from-script 命令

from-script Command

参数必需说明
--script
脚本文件路径
--image
主角图片路径
--send-feishu
发送到飞书
ParameterRequiredDescription
--script
Script file path
--image
Protagonist image path
--send-feishu
Send to Feishu

create-script 命令

create-script Command

参数必需说明
--output
输出脚本文件路径
--title
漫剧标题
--character
主角描述
--num-scenes
分镜数量
ParameterRequiredDescription
--output
Output script file path
--title
Manga drama title
--character
Protagonist description
--num-scenes
Number of storyboards

使用示例

Usage Examples

示例 1:生成校园日常漫剧

Example 1: Generate Campus Daily Manga Drama

bash
python3 scripts/manga_drama.py generate \
  --image ~/Desktop/girl_character.png \
  --theme "校园日常" \
  --scenes 3 \
  --send-feishu
生成3个分镜:
  1. 主角登场(校园门口)
  2. 动作场景(上课/运动)
  3. 结尾定格(温馨画面)
bash
python3 scripts/manga_drama.py generate \
  --image ~/Desktop/girl_character.png \
  --theme "校园日常" \
  --scenes 3 \
  --send-feishu
Generate 3 storyboards:
  1. Protagonist appearance (at the school gate)
  2. Action scene (having class/doing sports)
  3. Ending freeze frame (warm picture)

示例 2:创建自定义漫剧

Example 2: Create Custom Manga Drama

bash
undefined
bash
undefined

创建脚本

Create script

python3 scripts/manga_drama.py create-script
--output spring_festival.json
--title "春节团圆"
--character "白发奶奶"
--num-scenes 5
python3 scripts/manga_drama.py create-script
--output spring_festival.json
--title "春节团圆"
--character "白发奶奶"
--num-scenes 5

编辑 spring_festival.json 文件

Edit the spring_festival.json file

然后生成

Then generate

python3 scripts/manga_drama.py from-script
--script spring_festival.json
--image ~/Desktop/grandma.png
--send-feishu
undefined
python3 scripts/manga_drama.py from-script
--script spring_festival.json
--image ~/Desktop/grandma.png
--send-feishu
undefined

风格特点

Style Features

  • 漫画质感:手绘风格,线条清晰
  • 柔和色彩:温馨治愈的色调
  • 电影构图:专业的画面构图
  • 角色一致性:基于同一张主角图片生成
  • Comic Texture: Hand-drawn style with clear lines
  • Soft Colors: Warm and healing tones
  • Cinematic Composition: Professional picture composition
  • Character Consistency: Generated based on the same protagonist image

技术细节

Technical Details

调用流程

Call Flow

1. 分析主角图片 → 提取角色特征
2. 根据主题 → 生成分镜脚本
3. 每个分镜 → 调用 Seedance 图生视频
4. 可选 → 发送到飞书
1. Analyze protagonist image → Extract character features
2. According to theme → Generate storyboard script
3. Each storyboard → Call Seedance image-to-video
4. Optional → Send to Feishu

视频规格

Video Specifications

  • 默认比例:9:16(竖屏,适合手机观看)
  • 默认分辨率:1080p
  • 默认时长:每分镜5秒
  • 风格:漫画/手绘风格
  • Default Aspect Ratio: 9:16 (vertical screen, suitable for mobile viewing)
  • Default Resolution: 1080p
  • Default Duration: 5 seconds per storyboard
  • Style: Comic/hand-drawn style

输出结构

Output Structure

~/Desktop/drama_我的漫剧/
├── drama_script_xxx.json    # 脚本文件
├── scene_1_introduction.mp4 # 分镜1
├── scene_2_action.mp4       # 分镜2
├── scene_3_emotion.mp4      # 分镜3
└── ...
~/Desktop/drama_我的漫剧/
├── drama_script_xxx.json    # Script file
├── scene_1_introduction.mp4 # Storyboard 1
├── scene_2_action.mp4       # Storyboard 2
├── scene_3_emotion.mp4      # Storyboard 3
└── ...

注意事项

Notes

  1. 主角图片质量:清晰的角色图片能获得更好的生成效果
  2. 提示词优化:可以编辑脚本文件自定义每个分镜的提示词
  3. 生成时间:每个分镜约30-60秒,多个分镜需要耐心等待
  4. 文件大小:1080p视频较大,发送飞书可能需要分片上传
  1. Protagonist Image Quality: Clear character images can get better generation results
  2. Prompt Optimization: You can edit the script file to customize the prompt for each storyboard
  3. Generation Time: Each storyboard takes about 30-60 seconds, please wait patiently for multiple storyboards
  4. File Size: 1080p videos are large, sending to Feishu may require分片upload

进阶用法

Advanced Usage

自定义分镜提示词

Custom Storyboard Prompt

编辑生成的脚本文件,修改
prompt
字段:
json
{
  "prompt": "{character}在樱花树下读书,花瓣飘落,漫画风格,温馨治愈..."
}
Edit the generated script file and modify the
prompt
field:
json
{
  "prompt": "{character}在樱花树下读书,花瓣飘落,漫画风格,温馨治愈..."
}

批量生成系列漫剧

Batch Generate Series Manga Dramas

创建多个脚本,批量生成:
bash
for script in scripts/*.json; do
  python3 scripts/manga_drama.py from-script \
    --script "$script" \
    --image ~/Desktop/character.png
done
Create multiple scripts and generate in batches:
bash
for script in scripts/*.json; do
  python3 scripts/manga_drama.py from-script \
    --script "$script" \
    --image ~/Desktop/character.png
done

参考文档

References