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_KEYYou need to set the environment variable.
ARK_API_KEY配置方式(推荐)
Configuration Method (Recommended)
- 复制配置模板:
bash
cp .canghe-skills/.env.example .canghe-skills/.env- 编辑 文件,填写你的 API Key:
.canghe-skills/.env
ARK_API_KEY=your-actual-api-key-here- Copy the configuration template:
bash
cp .canghe-skills/.env.example .canghe-skills/.env- Edit the file and fill in your API Key:
.canghe-skills/.env
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
- 系统环境变量 ()
process.env - 当前目录
.canghe-skills/.env - 用户主目录
~/.canghe-skills/.env
需要依赖技能:seedance-video-generation
- System environment variables ()
process.env - Current directory
.canghe-skills/.env - 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-feishuProvide 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-feishu2. 根据脚本生成漫剧
2. Generate Manga Drama from Script
先创建脚本,再生成视频:
bash
undefinedCreate 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
--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
--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
--script my_drama.json
--image /path/to/character.png
--send-feishu
undefinedpython3 scripts/manga_drama.py from-script
--script my_drama.json
--image /path/to/character.png
--send-feishu
--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 Type | Name | Description |
|---|---|---|
| introduction | Protagonist Appearance | Introduce the protagonist and display character features |
| action | Action Scene | The protagonist performs a certain action |
| emotion | Emotional Expression | Express a certain emotion |
| interaction | Interaction Scene | Interact with the environment or other elements |
| ending | Ending Freeze Frame | Manga 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
| 参数 | 必需 | 说明 |
|---|---|---|
| ✅ | 主角图片路径 |
| ✅ | 漫剧主题/剧情描述 |
| ❌ | 分镜数量(默认3) |
| ❌ | 输出目录(默认~/Desktop) |
| ❌ | 发送到飞书 |
| Parameter | Required | Description |
|---|---|---|
| ✅ | Protagonist image path |
| ✅ | Manga drama theme/plot description |
| ❌ | Number of storyboards (default 3) |
| ❌ | Output directory (default ~/Desktop) |
| ❌ | Send to Feishu |
from-script 命令
from-script Command
| 参数 | 必需 | 说明 |
|---|---|---|
| ✅ | 脚本文件路径 |
| ✅ | 主角图片路径 |
| ❌ | 发送到飞书 |
| Parameter | Required | Description |
|---|---|---|
| ✅ | Script file path |
| ✅ | Protagonist image path |
| ❌ | Send to Feishu |
create-script 命令
create-script Command
| 参数 | 必需 | 说明 |
|---|---|---|
| ✅ | 输出脚本文件路径 |
| ❌ | 漫剧标题 |
| ❌ | 主角描述 |
| ❌ | 分镜数量 |
| Parameter | Required | Description |
|---|---|---|
| ✅ | Output script file path |
| ❌ | Manga drama title |
| ❌ | Protagonist description |
| ❌ | 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个分镜:
- 主角登场(校园门口)
- 动作场景(上课/运动)
- 结尾定格(温馨画面)
bash
python3 scripts/manga_drama.py generate \
--image ~/Desktop/girl_character.png \
--theme "校园日常" \
--scenes 3 \
--send-feishuGenerate 3 storyboards:
- Protagonist appearance (at the school gate)
- Action scene (having class/doing sports)
- Ending freeze frame (warm picture)
示例 2:创建自定义漫剧
Example 2: Create Custom Manga Drama
bash
undefinedbash
undefined创建脚本
Create script
python3 scripts/manga_drama.py create-script
--output spring_festival.json
--title "春节团圆"
--character "白发奶奶"
--num-scenes 5
--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
--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
--script spring_festival.json
--image ~/Desktop/grandma.png
--send-feishu
undefinedpython3 scripts/manga_drama.py from-script
--script spring_festival.json
--image ~/Desktop/grandma.png
--send-feishu
--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
- 主角图片质量:清晰的角色图片能获得更好的生成效果
- 提示词优化:可以编辑脚本文件自定义每个分镜的提示词
- 生成时间:每个分镜约30-60秒,多个分镜需要耐心等待
- 文件大小:1080p视频较大,发送飞书可能需要分片上传
- Protagonist Image Quality: Clear character images can get better generation results
- Prompt Optimization: You can edit the script file to customize the prompt for each storyboard
- Generation Time: Each storyboard takes about 30-60 seconds, please wait patiently for multiple storyboards
- File Size: 1080p videos are large, sending to Feishu may require分片upload
进阶用法
Advanced Usage
自定义分镜提示词
Custom Storyboard Prompt
编辑生成的脚本文件,修改 字段:
promptjson
{
"prompt": "{character}在樱花树下读书,花瓣飘落,漫画风格,温馨治愈..."
}Edit the generated script file and modify the field:
promptjson
{
"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
doneCreate 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
- Seedance 视频生成
- 火山方舟文档
- Seedance Video Generation
- Volcano Engine Ark Documentation