comfyui

Generate images, video, and audio by executing ComfyUI diffusion workflows via REST and WebSocket APIs.

Updated Jul 3, 2026
One-click install
npx skills add https://github.com/CHENHUI-X/toolbox --skill comfyui-chenhui-x
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: comfyui
Source: https://github.com/CHENHUI-X/toolbox/tree/main/custom-skills/creative/comfyui
Command: npx skills add https://github.com/CHENHUI-X/toolbox --skill comfyui-chenhui-x

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires comfy-cli, requests, websocket-client, and includes scripts (resource) and references (resource) components.

What problem does it solve? Running generative AI workflows (Stable Diffusion, Flux, SDXL, AnimateDiff, Wan video) requires installing ComfyUI, managing models and custom nodes, and driving its REST/WebSocket API — a multi-step process with many failure points. This Skill automates setup, dependency checking, parameter injection, execution, and output download for both local and Comfy Cloud servers. ## Core Features & Use Cases - Automated Setup & Health Checks: Hardware probing (GPU/VRAM), comfy-cli installation, server launch, and a one-line health check that verifies CLI, server, models, and a smoke test. - Workflow Execution: Inject prompts, seeds, and parameters into API-format workflow JSON, submit jobs, monitor progress over WebSocket, and download outputs — locally or on Comfy Cloud with automatic endpoint routing. - Dependency Management: Detect missing custom nodes, models, and embeddings in a workflow, then auto-install them via comfy-cli with concrete fix commands. - Use Case: A user asks to generate 8 variations of an image with random seeds; the Skill checks dependencies, runs a batch sweep with run_batch.py, and returns the output file paths as structured JSON. ## Quick Start Ask the AI to set up ComfyUI and generate an image from a text prompt using the SDXL example workflow.

Frequently Asked Questions about comfyui

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run a ComfyUI workflow from the command line?

Use run_workflow.py with an API-format workflow JSON and a parameter payload, for example --workflow sdxl_txt2img.json --args '{"prompt": "...", "seed": -1}'. The script injects parameters, submits the job, monitors execution, and downloads outputs to your chosen directory.

How do I install ComfyUI locally with comfy-cli?

Run scripts/comfyui_setup.sh, which checks your hardware, installs comfy-cli via pipx or uvx, installs ComfyUI with the right GPU flag, and launches the server on port 8188. Alternatively run comfy --skip-prompt install --nvidia (or --m-series, --amd) manually.

What hardware do I need to run ComfyUI locally?

You need an NVIDIA GPU with at least 6 GB VRAM (8 GB for SDXL, 12 GB or more for Flux and video), an AMD GPU with ROCm on Linux, or an Apple Silicon Mac with at least 16 GB unified memory. Machines without a capable GPU should use Comfy Cloud instead.

Can I use Comfy Cloud instead of a local GPU?

Yes. Set the COMFY_CLOUD_API_KEY environment variable and pass --host https://cloud.comfy.org to the scripts, which automatically route to cloud endpoints. Note the free tier cannot run workflows via the API; a paid subscription is required for execution.

Why does my ComfyUI workflow fail with class_type not found?

This error means a required custom node is not installed on the server. Run check_deps.py against the workflow to list missing nodes with install commands, or use auto_fix_deps.py to install them automatically via comfy node install.

What is the difference between editor format and API format workflows?

API format has top-level node IDs each with a class_type field and is directly executable via the /prompt endpoint. Editor format contains top-level nodes and links arrays and must be re-exported from the ComfyUI web UI using Workflow → Export (API) before the scripts can run it.