komga-creater/workflow/漫画生成工作流-v2.yml
2026-03-03 17:59:27 +08:00

408 lines
12 KiB
YAML
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.

app:
description: 漫画生成工具 - 支持传统小说和连续动作描述两种输入模式
icon: 🎨
icon_background: '#E3F2FD'
mode: workflow
name: 漫画生成工作流-v2
use_icon_as_answer_icon: false
kind: app
version: 0.1.2
workflow:
conversation_variables: []
environment_variables: []
features:
file_upload:
enabled: false
opening_statement: '请输入小说段落或连续动作描述,选择输出模式生成漫画分镜提示词。'
retriever_resource:
enabled: false
sensitive_word_avoidance:
enabled: false
speech_to_text:
enabled: false
suggested_questions_after_answer:
enabled: false
text_to_speech:
enabled: false
graph:
edges:
- data:
isInIteration: false
sourceType: start
targetType: if-else
id: 1740748800000-source-1740748800004-target
source: '1740748800000'
sourceHandle: source
target: '1740748800004'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
sourceType: if-else
targetType: llm
id: 1740748800004-true-1740748800001-target
source: '1740748800004'
sourceHandle: 'true'
target: '1740748800001'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
sourceType: if-else
targetType: llm
id: 1740748800004-false-1740748800005-target
source: '1740748800004'
sourceHandle: 'false'
target: '1740748800005'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
sourceType: llm
targetType: llm
id: 1740748800001-source-1740748800002-target
source: '1740748800001'
sourceHandle: source
target: '1740748800002'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
sourceType: llm
targetType: llm
id: 1740748800005-source-1740748800006-target
source: '1740748800005'
sourceHandle: source
target: '1740748800006'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
sourceType: llm
targetType: answer
id: 1740748800002-source-1740748800003-target
source: '1740748800002'
sourceHandle: source
target: '1740748800003'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
sourceType: llm
targetType: answer
id: 1740748800006-source-1740748800007-target
source: '1740748800006'
sourceHandle: source
target: '1740748800007'
targetHandle: target
type: custom
zIndex: 0
nodes:
- data:
desc: ''
selected: false
title: 开始
type: start
variables:
- label: 输入文本
max_length: 3000
options: []
required: true
type: paragraph
variable: input_text
- label: 输出模式
max_length: 48
options:
- 传统漫画分镜
- 时间线漫画分镜
required: true
type: select
variable: output_mode
height: 115
id: '1740748800000'
position:
x: 92
y: 292
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
cases:
- case_id: 'true'
conditions:
- comparison_operator: contains
id: condition-001
value: 传统漫画分镜
varType: string
variable_selector:
- '1740748800000'
- output_mode
id: 'true'
logical_operator: and
- case_id: 'false'
conditions:
- comparison_operator: contains
id: condition-002
value: 时间线漫画分镜
varType: string
variable_selector:
- '1740748800000'
- output_mode
id: 'false'
logical_operator: and
desc: 根据输出模式选择处理路径
selected: false
title: 模式选择器
type: if-else
height: 140
id: '1740748800004'
position:
x: 384
y: 292
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
context:
enabled: false
desc: 润色小说文本,增强画面感
model:
completion_params:
max_tokens: 2000
temperature: 0.7
mode: chat
name: deepseek-reasoner
provider: langgenius/deepseek/deepseek
prompt_template:
- id: system-001
role: system
text: |
你是一个专业的小说编辑。你的任务是将用户提供的小说段落进行润色和增强,使其更适合转换为视觉分镜。
要求:
1. 保持原有情节和人物设定不变
2. 增强场景描述、角色动作和情感表达
3. 让文本更具画面感和戏剧张力
4. 输出保持中文长度控制在原文本的1.2-1.5倍
- id: user-001
role: user
text: '{{#1740748800000.input_text#}}'
selected: false
title: 小说编辑AI
type: llm
variables: []
height: 98
id: '1740748800001'
position:
x: 676
y: 150
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
context:
enabled: false
desc: 处理连续动作描述,提取时间节奏
model:
completion_params:
max_tokens: 2000
temperature: 0.7
mode: chat
name: deepseek-reasoner
provider: langgenius/deepseek/deepseek
prompt_template:
- id: system-001
role: system
text: |
你是一个专业的动作描述分析师。你的任务是分析用户提供的连续动作描述如15秒画面描述提取关键的时间节点和视觉转折点。
要求:
1. 识别描述中的关键动作转折点如从A动作转为B动作的瞬间
2. 标注每个关键动作的大致时间点(如"0-3秒"、"3-6秒"等,自由决定时间范围)
3. 为每个时间点提取最具代表性的画面描述
4. 保持动作的连贯性和叙事逻辑
5. 输出格式:时间标记 + 画面描述,例如:
[0-3秒] 王雪在雨中奔跑,长发湿漉漉贴在脸上
[3-6秒] 惊惶回眸,看到追赶者的剪影
6. 分镜数量由AI根据动作节奏自动决定一般3-8个
- id: user-001
role: user
text: '{{#1740748800000.input_text#}}'
selected: false
title: 时间线分析AI
type: llm
variables: []
height: 98
id: '1740748800005'
position:
x: 676
y: 380
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
context:
enabled: false
desc: 将小说文本转换为传统漫画分镜
model:
completion_params:
max_tokens: 3000
temperature: 0.6
mode: chat
name: deepseek-reasoner
provider: langgenius/deepseek/deepseek
prompt_template:
- id: system-001
role: system
text: |
你是一个专业的漫画分镜师。请将叙述文本转换为3-5个分镜描述每个分镜包含视觉元素和图片生成提示词。
输出格式要求Markdown
# 分镜分析
## 场景概览
[简要描述整体场景]
## 分镜详情
### 分镜1[标题]
**场景描述:** [详细视觉描述]
**角色动作:** [主要角色动作]
**情感氛围:** [情感色彩]
**图片提示词:** [用于图片生成的提示词,包含风格、构图等]
### 分镜2[标题]
...
## 风格建议
[推荐的图片生成风格,如:动漫风格、写实插画、水彩等]
注意:图片提示词要具体、详细,包含构图、灯光、风格等要素。
- id: user-001
role: user
text: '{{#1740748800001.text#}}'
selected: false
title: 传统分镜AI
type: llm
variables: []
height: 98
id: '1740748800002'
position:
x: 968
y: 150
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
context:
enabled: false
desc: 将时间线分析转换为带时间标记的漫画分镜
model:
completion_params:
max_tokens: 3000
temperature: 0.6
mode: chat
name: deepseek-reasoner
provider: langgenius/deepseek/deepseek
prompt_template:
- id: system-001
role: system
text: |
你是一个专业的漫画分镜师。请将时间线分析转换为带时间标记的漫画分镜,每个分镜包含视觉元素和图片生成提示词。
输出格式要求Markdown
# 时间线漫画分镜分析
## 场景概览
[简要描述整体场景和时间跨度]
## 时间线分镜详情
### 分镜1[时间标记] [标题]
**时间点:** [如0-3秒]
**场景描述:** [详细视觉描述]
**角色动作:** [主要角色动作]
**情感氛围:** [情感色彩]
**图片提示词:** [用于图片生成的提示词,包含风格、构图等]
### 分镜2[时间标记] [标题]
...
## 叙事节奏建议
[关于分镜之间的时间感和节奏的建议]
## 风格建议
[推荐的图片生成风格]
注意:
1. 每个分镜必须标注时间点(如"0-3秒"、"3-6秒"等)
2. 时间标记应该保持连贯,覆盖整个动作过程
3. 图片提示词要具体、详细可直接用于AI绘图
- id: user-001
role: user
text: '{{#1740748800005.text#}}'
selected: false
title: 时间线分镜AI
type: llm
variables: []
height: 98
id: '1740748800006'
position:
x: 968
y: 380
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
answer: '{{#1740748800002.text#}}'
desc: 输出传统漫画分镜提示词
selected: false
title: 传统分镜输出
type: answer
variables: []
height: 102
id: '1740748800003'
position:
x: 1260
y: 150
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
answer: '{{#1740748800006.text#}}'
desc: 输出时间线漫画分镜提示词
selected: false
title: 时间线分镜输出
type: answer
variables: []
height: 102
id: '1740748800007'
position:
x: 1260
y: 380
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244