COMFYUI_BASE_URL: "http://127.0.0.1:8188" # 你的ComfyUI本地服务地址,默认端口8188
COMFYUI_API_KEY: "" # 选填,若你的ComfyUI开启了API认证,填写你的API密钥
COMFYUI_OUTPUT_DIR: "D:/ComfyUI/output" # 你的ComfyUI输出文件夹绝对路径,用于OpenClaw定位生成的素材
WORKFLOW_TEMPLATES:
# 角色原画工作流(适配立绘、三视图、NPC、怪物,推荐带ControlNet线稿控型)
character: |
{
"3": {
"class_type": "KSampler",
"inputs": {
"cfg": 8,
"denoise": 1,
"latent_image": ["5", 0],
"model": ["4", 0],
"negative": ["7", 0],
"positive": ["6", 0],
"sampler_name": "euler",
"scheduler": "normal",
"seed": -1,
"steps": 20
}
},
"4": {
"class_type": "CheckpointLoaderSimple",
"inputs": {
"ckpt_name": "sdxl_xl_base_1.0.safetensors"
}
},
"5": {
"class_type": "EmptyLatentImage",
"inputs": {
"batch_size": 1,
"height": 1024,
"width": 1024
}
},
"6": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": ["4", 1],
"text": "{{prompt}}"
}
},
"7": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": ["4", 1],
"text": "{{negative_prompt}}"
}
},
"8": {
"class_type": "VAEDecode",
"inputs": {
"samples": ["3", 0],
"vae": ["4", 2]
}
},
"9": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "game_character",
"images": ["8", 0]
}
}
}
# 场景原画工作流(适配大场景、关卡、主城,推荐带景深、高清修复)
scene: |
{
"3": {
"class_type": "KSampler",
"inputs": {
"cfg": 7,
"denoise": 1,
"latent_image": ["5", 0],
"model": ["4", 0],
"negative": ["7", 0],
"positive": ["6", 0],
"sampler_name": "dpmpp_2m",
"scheduler": "karras",
"seed": -1,
"steps": 24
}
},
"4": {
"class_type": "CheckpointLoaderSimple",
"inputs": {
"ckpt_name": "sdxl_xl_base_1.0.safetensors"
}
},
"5": {
"class_type": "EmptyLatentImage",
"inputs": {
"batch_size": 1,
"height": 1024,
"width": 2048
}
},
"6": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": ["4", 1],
"text": "{{prompt}}"
}
},
"7": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": ["4", 1],
"text": "{{negative_prompt}}"
}
},
"8": {
"class_type": "VAEDecode",
"inputs": {
"samples": ["3", 0],
"vae": ["4", 2]
}
},
"9": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "game_scene",
"images": ["8", 0]
}
}
}
# 道具素材工作流(适配武器、装备、图标,推荐带透明背景、对称优化)
prop: |
{
"3": {
"class_type": "KSampler",
"inputs": {
"cfg": 8,
"denoise": 1,
"latent_image": ["5", 0],
"model": ["4", 0],
"negative": ["7", 0],
"positive": ["6", 0],
"sampler_name": "euler",
"scheduler": "normal",
"seed": -1,
"steps": 20
}
},
"4": {
"class_type": "CheckpointLoaderSimple",
"inputs": {
"ckpt_name": "sdxl_xl_base_1.0.safetensors"
}
},
"5": {
"class_type": "EmptyLatentImage",
"inputs": {
"batch_size": 1,
"height": 1024,
"width": 1024
}
},
"6": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": ["4", 1],
"text": "{{prompt}}, transparent background"
}
},
"7": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": ["4", 1],
"text": "{{negative_prompt}}, white background, solid background"
}
},
"8": {
"class_type": "VAEDecode",
"inputs": {
"samples": ["3", 0],
"vae": ["4", 2]
}
},
"9": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "game_prop",
"images": ["8", 0]
}
}
}
# 技能特效工作流(适配光效、粒子、序列帧,推荐带透明通道、动态参数)
vfx: |
{
"3": {
"class_type": "KSampler",
"inputs": {
"cfg": 7.5,
"denoise": 1,
"latent_image": ["5", 0],
"model": ["4", 0],
"negative": ["7", 0],
"positive": ["6", 0],
"sampler_name": "dpmpp_2m",
"scheduler": "karras",
"seed": -1,
"steps": 20
}
},
"4": {
"class_type": "CheckpointLoaderSimple",
"inputs": {
"ckpt_name": "sdxl_xl_base_1.0.safetensors"
}
},
"5": {
"class_type": "EmptyLatentImage",
"inputs": {
"batch_size": 1,
"height": 512,
"width": 512
}
},
"6": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": ["4", 1],
"text": "{{prompt}}, glowing effect, transparent background, black background, vfx, particle effect"
}
},
"7": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": ["4", 1],
"text": "{{negative_prompt}}, text, watermark, ugly, deformed"
}
},
"8": {
"class_type": "VAEDecode",
"inputs": {
"samples": ["3", 0],
"vae": ["4", 2]
}
},
"9": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "game_vfx",
"images": ["8", 0]
}
}
}
RTX3090_OPTIMIZATION:
max_batch_size: 4 # 单批次最大生成数量,3090 24G显存推荐不超过4
max_resolution: 2048 # 单张图片最大分辨率,超过会自动分批次
default_steps: 20 # 默认采样步数,平衡速度与质量
enable_xformers: true # 已默认在ComfyUI启动时开启,此处为参数校验
```json
{
"prompt": {{替换参数后的完整工作流JSON}},
"client_id": "openclaw-game-art-generator"
}
共 1 个版本