模板概述
工作流结构
节点流程图(Mermaid)
graph TD
A[CheckpointLoaderSimple] -->|MODEL| B[LoraLoader]
A -->|CLIP| B
B -->|MODEL| C[KSampler]
B -->|CLIP| D[CLIPTextEncode]
B -->|CLIP| E[CLIPTextEncode]
B -->|VAE| F[VAEDecode]
D -->|CONDITIONING| C
E -->|CONDITIONING| C
G[EmptyLatentImage] -->|LATENT| C
C -->|LATENT| F
F -->|IMAGE| H[SaveImage]
style A fill:#e1f5ff
style B fill:#fff4e1
style C fill:#fff4e1
style D fill:#ffe1f5
style E fill:#ffe1f5
style F fill:#e1ffe1
style G fill:#e1ffe1
style H fill:#ffe1e1
LoRA增强流程
graph LR
A[主模型] --> B[加载LoRA]
B --> C[增强模型]
C --> D[采样生成]
D --> E[高质量输出]
style A fill:#e1ffe1
style B fill:#fff4e1
style C fill:#fff4e1
style D fill:#fff4e1
style E fill:#fff4e1
节点配置
1. CheckpointLoaderSimple
{
"inputs": {
"ckpt_name": "v1-5-pruned-emaonly.ckpt"
},
"class_type": "CheckpointLoaderSimple"
}
2. LoraLoader
{
"inputs": {
"lora_name": "detail_tweaker.safetensors",
"strength_model": 0.8,
"strength_clip": 0.8,
"model": ["1", 0],
"clip": ["1", 1]
},
"class_type": "LoraLoader"
}
3. CLIPTextEncode (正向)
{
"inputs": {
"text": "beautiful landscape, mountains, sunset, 4k, detailed",
"clip": ["2", 1]
},
"class_type": "CLIPTextEncode"
}
4. CLIPTextEncode (负向)
{
"inputs": {
"text": "ugly, blurry, low quality",
"clip": ["2", 1]
},
"class_type": "CLIPTextEncode"
}
5. EmptyLatentImage
{
"inputs": {
"width": 512,
"height": 512,
"batch_size": 1
},
"class_type": "EmptyLatentImage"
}
6. KSampler
{
"inputs": {
"seed": 123456789,
"steps": 20,
"cfg": 8.0,
"sampler_name": "euler",
"scheduler": "normal",
"denoise": 1.0,
"model": ["2", 0],
"positive": ["3", 0],
"negative": ["4", 0],
"latent_image": ["5", 0]
},
"class_type": "KSampler"
}
7. VAEDecode
{
"inputs": {
"samples": ["6", 0],
"vae": ["1", 2]
},
"class_type": "VAEDecode"
}
8. SaveImage
{
"inputs": {
"filename_prefix": "lora_",
"images": ["7", 0]
},
"class_type": "SaveImage"
}
完整工作流JSON
{
"1": {
"inputs": {
"ckpt_name": "v1-5-pruned-emaonly.ckpt"
},
"class_type": "CheckpointLoaderSimple"
},
"2": {
"inputs": {
"lora_name": "detail_tweaker.safetensors",
"strength_model": 0.8,
"strength_clip": 0.8,
"model": ["1", 0],
"clip": ["1", 1]
},
"class_type": "LoraLoader"
},
"3": {
"inputs": {
"text": "beautiful landscape, mountains, sunset, 4k, detailed",
"clip": ["2", 1]
},
"class_type": "CLIPTextEncode"
},
"4": {
"inputs": {
"text": "ugly, blurry, low quality",
"clip": ["2", 1]
},
"class_type": "CLIPTextEncode"
},
"5": {
"inputs": {
"width": 512,
"height": 512,
"batch_size": 1
},
"class_type": "EmptyLatentImage"
},
"6": {
"inputs": {
"seed": 123456789,
"steps": 20,
"cfg": 8.0,
"sampler_name": "euler",
"scheduler": "normal",
"denoise": 1.0,
"model": ["2", 0],
"positive": ["3", 0],
"negative": ["4", 0],
"latent_image": ["5", 0]
},
"class_type": "KSampler"
},
"7": {
"inputs": {
"samples": ["6", 0],
"vae": ["1", 2]
},
"class_type": "VAEDecode"
},
"8": {
"inputs": {
"filename_prefix": "lora_",
"images": ["7", 0]
},
"class_type": "SaveImage"
}
}
LoRA参数
Strength设置
graph TD
A[LoRA Strength] --> B[0.3-0.5]
A --> C[0.5-0.8]
A --> D[0.8-1.2]
B --> B1[轻微影响]
C --> C1[标准强度]
D --> D1[强烈影响]
style A fill:#e1f5ff
style B fill:#fff4e1
style C fill:#ffe1f5
style D fill:#e1ffe1
推荐配置
- 细节增强: strength=0.8
- 风格转换: strength=0.9
- 人物优化: strength=0.6
使用步骤
LoRA增强流程
graph LR
A[加载主模型] --> B[加载LoRA]
B --> C[设置提示词]
C --> D[采样生成]
D --> E[保存结果]
style A fill:#e1ffe1
style B fill:#fff4e1
style C fill:#fff4e1
style D fill:#fff4e1
style E fill:#fff4e1
示例结果
示例1: 细节增强
- LoRA: detail_tweaker
- strength: 0.8
- 提示词: beautiful landscape
- 结果: 细节更丰富的图像
示例2: 风格化
- LoRA: anime_style
- strength: 0.9
- 提示词: beautiful girl
- 结果: 动漫风格图像
常见问题
Q1: LoRA strength设置多少?
A: 从0.8开始,根据效果调整,通常0.5-1.0。
Q2: 可以使用多个LoRA吗?
A: 可以,串联多个LoraLoader节点。
Q3: LoRA效果不明显?
A: 增加strength值,检查LoRA是否正确加载。
Q4: LoRA影响速度吗?
A: 轻微影响,但通常可以忽略。
Q5: 如何选择LoRA?
A: 根据需求选择,细节增强用detail类,风格化用风格类。
相关模板
更新日志
- 2026-01-26: 初始版本创建