/install comfy-ui
ComfyUI Local Skill
This skill allows OpenClaw to generate images by connecting to a ComfyUI instance running on the local network.
Setup
- Server Address: Set the
COMFYUI_SERVER_ADDRESSenvironment variable to your PC's IP and port (e.g.,http://192.168.1.119:8189). - API Mode: Ensure "Enable Dev mode" is turned on in your ComfyUI settings to allow API interactions.
Usage
Generate an Image
Run the internal generation script with a prompt:
python3 {skillDir}/scripts/comfy_gen.py "your image prompt" $COMFYUI_SERVER_ADDRESS
Use a Custom Workflow
Place your API JSON workflows in the workflows/ folder, then specify the path:
python3 {skillDir}/scripts/comfy_gen.py "your prompt" $COMFYUI_SERVER_ADDRESS --workflow {skillDir}/workflows/my_workflow.json
Features
- SDXL Default: Uses a high-quality SDXL workflow (Juggernaut XL) by default.
- Auto-Backup: Designed to save images to
image-gens/and can be configured to sync to local document folders. - Custom Workflows: Supports external API JSON workflows saved in the
workflows/folder. The script will automatically try to inject your prompt and a random seed into the workflow nodes.
Implementation Details
The skill uses a Python helper (scripts/comfy_gen.py) to handle the WebSocket/HTTP handshake with the ComfyUI API, queue the prompt, and download the resulting image.
ComfyUI Image Generation Notes:
-
Server Address:
- The ComfyUI server address needs to be passed as a direct argument to the
comfy_gen.pyscript after the prompt, not just as an environment variable. - Example:
python3 ... "Your prompt" http://192.168.1.119:8189 ...
- The ComfyUI server address needs to be passed as a direct argument to the
-
Workflow Paths:
- When specifying a workflow file path that contains spaces or special characters, it must be enclosed in single quotes to be parsed correctly by the script.
- Example:
--workflow '/path/to/your/workflow file name.json'
-
Lora Weight Control:
- The current
comfy_gen.pyscript does not appear to have a direct parameter for controlling Lora weights (e.g., setting 'l1lly' Lora to 0.90). This might need to be configured within the workflow JSON itself, or require modifications to the script or workflow.
- The current
-
Output Filenames:
- Generated images might be saved with temporary names (e.g.,
ComfyUI_temp_...png) rather than more descriptive ones by default.
- Generated images might be saved with temporary names (e.g.,
-
ComfyUI Setup:
- Ensure "Enable Dev mode" is turned on in ComfyUI settings for API interactions.
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install comfy-ui - 安装完成后,直接呼叫该 Skill 的名称或使用
/comfy-ui触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
ComfyUI Skill 是什么?
Generate high-quality images using a local ComfyUI instance. Use when the user wants private, powerful image generation via their own hardware and custom wor... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 912 次。
如何安装 ComfyUI Skill?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install comfy-ui」即可一键安装,无需额外配置。
ComfyUI Skill 是免费的吗?
是的,ComfyUI Skill 完全免费(开源免费),可自由下载、安装和使用。
ComfyUI Skill 支持哪些平台?
ComfyUI Skill 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 ComfyUI Skill?
由 Dihan(@dihan)开发并维护,当前版本 v1.0.0。