ComfyUI Client for Openclaw

A robust Node.js client for automating image and video generation workflows through the ComfyUI API.

imjszhang
v1.2.0
Apr 2, 2026
4
1.3k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install js-comfyui-client

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install js-comfyui-client using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is ComfyUI Client?

The ComfyUI Client is a specialized skill designed to bridge the gap between AI coding agents and the powerful ComfyUI ecosystem. By utilizing this component of Openclaw Skills, developers can programmatically generate images and videos, modify prompts on the fly, and manage complex generation queues without manual intervention. It is built to handle professional creative workflows, providing a reliable interface for text-to-image, image-to-image, and video generation tasks.

This skill is particularly valuable for developers looking to integrate high-fidelity AI media production into their automated pipelines. It streamlines the process of loading workflow JSON files, injecting parameters into specific nodes, and retrieving generated assets. Whether you are building a content automation bot or a custom design tool, this addition to your Openclaw Skills library provides the technical foundation needed for scalable AI media operations.

ComfyUI Client Use Cases

  • Generating high-quality images from text prompts (txt2img) using optimized turbo workflows.
  • Executing semantic image editing and style transfers using advanced Qwen visual-language models.
  • Maintaining structural consistency in image variations through ControlNet and Canny edge detection.
  • Creating cinematic videos from images or sequence frames using Wan 2.2 models.
  • Automating batch media generation tasks within larger developer automation scripts.

How ComfyUI Client Works

  1. The skill connects to a running ComfyUI server instance, typically hosted locally or on a remote GPU server.
  2. It parses a target workflow JSON, automatically expanding subgraphs and identifying key input nodes for prompts and images.
  3. User-provided data, such as text descriptions or local file paths, are dynamically injected into the workflow's logical structure.
  4. If local images are provided, the client handles the multipart upload to the ComfyUI server's input directory.
  5. The modified workflow is submitted to the ComfyUI task queue, and the client monitors execution progress via status polling.
  6. Upon completion, the skill automatically downloads the resulting images or videos and organizes them into a structured local session directory.

ComfyUI Client Setup

Ensure you have a ComfyUI server running (default is http://127.0.0.1:8188) and the required models installed. In your project directory, follow these steps:

npm install
# Optional: Configure your server URL in a .env file
echo "COMFYUI_SERVER_URL=http://127.0.0.1:8188" > .env
# Run the client using the skill path
node .claude/skills/comfyui-client/scripts/comfyUIClient.js --help

ComfyUI Client Data Schema & Taxonomy

The skill organizes its output in a dedicated directory structure for every execution session, ensuring data integrity and easy retrieval within the Openclaw Skills framework.

Path Description
work_dir/comfyui_output/ The base directory for all generated outputs.
comfyui_<timestamp>/ A unique session folder for each specific generation task.
session_info.json Contains configuration details and metadata for the session.
workflow.json The final version of the workflow submitted to the API.
result.json Summary of execution results, including generated file paths.
<nodeId>_<filename> The actual image or video assets produced by ComfyUI.
error.json Detailed error logs generated in case of task failure.

ComfyUI Client Advanced Features

  • Subgraph Expansion: Automatically flattens complex, nested workflows into a format compatible with the ComfyUI API.
  • Intelligent Node Discovery: Automatically detects positive and negative prompt nodes by analyzing node titles and types.
  • Support for Multiple Formats: Handles both standard ComfyUI UI JSON and exported API JSON formats seamlessly.
  • Automatic Image Upload: Detects local file paths and manages the upload lifecycle before triggering generation.
  • Programmatic Integration: Can be imported as a standard Node.js module for deep integration into other Openclaw Skills.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*