ComfyUI Skill
Drive ComfyUI for AI image/video generation, node-based workflow authoring, and
distributed GPU compute via the Salad Cloud API. ComfyUI runs in an external
Docker container reached over the Docker network — you talk to it through its
HTTP API, never the local filesystem.
agentbox.toml's skills.media.comfyui_builtin = false and this skill's
mcp.json entry "x-agentbox-gate": "env:ENABLE_COMFYUI_EXTERNAL" name the
same fact: ComfyUI is not baked into the image, it runs externally.
Container architecture (read first)
ComfyUI runs in an EXTERNAL Docker container, not locally. When calling from Claude
Code (its own container), pick the endpoint that matches where you are:
| Scenario |
Endpoint |
Notes |
| From Claude Code container |
http://comfyui:8188 |
Docker network hostname |
| From host machine |
http://localhost:8188 |
Port exposed to host |
| Container IP (fallback) |
http://172.18.0.X:8188 |
Check with ping comfyui |
Networking rules that actually bite:
- From inside the Claude Code container,
localhost:8188 will not reach ComfyUI —
use the comfyui Docker hostname.
- You cannot read the container filesystem; retrieve outputs via
/view?filename=...&type=output, not filesystem paths.
- The comfyui container's volume mounts (output/input/models under
/mnt/mldata/.../comfyui/...) are host-accessible only, not from here.
Check container status
From the Claude Code container, use the HTTP health check — this is the canonical
liveness probe and needs no Docker access:
ping -c1 comfyui # Should show IP like 172.18.0.X
curl -s http://comfyui:8188/system_stats | jq '.devices[0].name'
Docker-daemon diagnostics (no sudo). agentbox mounts the host Docker socket,
so plain docker talks to the host daemon from inside the container. Do not
prefix with sudo — it is blocked by no-new-privileges and will fail:
docker ps --filter "name=comfyui"
docker logs comfyui --tail 20
Prefer the comfyui:8188 HTTP check above; only fall back to these when the HTTP
probe is inconclusive.
Quick path
To build or repair the local GPU service, follow
references/sidecar-operations.md.
For resumable video jobs, use scripts/comfy_client.py; read
references/agent-kit.md for graph validation and durable
submission receipts. Local video model setup and workflows are documented in
references/video-models.md. For a complete explainer
of the current repository, start with codebase-video.
Generate a FLUX 2 image end-to-end with the bundled runnable script:
comfyui-generate \
"A stunning landscape at golden hour, cinematic lighting" output.png
It submits the current FLUX 2 workflow to http://comfyui:8188, polls to
completion, and downloads the PNG. For the manual step-by-step (health check →
submit → poll → download), the one-liner variant, VRAM freeing, and the live
model/node tables, see references/flux2-quickstart.md.
Capabilities
- Text-to-image (text2img) and image-to-image (img2img) generation
- Author and execute node-based workflows programmatically
- Video generation (AnimateDiff, CogVideoX, HunyuanVideo, LTX, Mochi, WAN, Cosmos)
- Manage models, LoRAs, checkpoints, VAEs
- Upscaling and post-processing
- Deploy to Salad Cloud for distributed GPU compute at scale
When to use this skill
- Generate AI images from text descriptions or transform image-to-image
- Design ComfyUI workflows programmatically
- Batch-process generation tasks
- Use or fine-tune LoRA models with FLUX/SD
- Generate AI video from text or images
- Deploy image generation at scale across distributed GPUs
When not to use
- 2D image manipulation (resize, crop, format convert) — use the imagemagick skill
- 3D modelling and scene creation — use the blender skill
- Video transcoding, editing, or audio extraction — use the ffmpeg-processing skill
- Diagrams, flowcharts, architecture visuals — use the mermaid-diagrams skill
- ML model training (classification, NLP, time series) — use pytorch-ml or flow-nexus-neural
References
Detail lives in references/ — pull the file that matches the task:
references/flux2-quickstart.md — full FLUX 2
generate/monitor/download flow, one-liner, VRAM management, current model + node tables.
references/api-and-parameters.md — local server
operations, API endpoints, text2img parameter table, sampler/scheduler lists, output
conversion, webhooks, error handling, directory layout.
references/workflows.md — FLUX 2 and legacy FLUX 1 workflow
JSON structures, supported image/video models, batch-generation Python.
references/salad-cloud.md — Salad SDK deployment, the full
recipe catalog (image/video/LLM), hardware recommendations, benchmarks, performance notes.
Bundled runnable assets in this directory:
comfyui-generate — FLUX 2 one-shot generator (quick path above), on PATH
from the agentbox-ops crate.
anima_workflow.json / anima_import_workflow.json — working sample animation
workflow graphs, kept as reference structures for generate.py.
mcp-server/ — ComfyUI MCP server surface.
Integration with other skills
- imagemagick — post-process generated images
- ffmpeg-processing — assemble/transcode generated video
- blender — 3D-to-2D workflows
- pytorch-ml — custom model training
Related skills
art for editorial illustration, infographics and comics via the Nano Banana image models; ComfyUI is the local-GPU FLUX/Stable Diffusion/video path.
1---2name: comfyui3description: Generate AI images and video with ComfyUI's node-based workflows (FLUX, Stable Diffusion, video models) on a local GPU or distributed Salad Cloud compute. Use when a task needs text-to-image, image-to-image, or text/image-to-video generation, ComfyUI workflow authoring, or scaling generation across GPUs.4---56# ComfyUI Skill78Drive ComfyUI for AI image/video generation, node-based workflow authoring, and9distributed GPU compute via the Salad Cloud API. ComfyUI runs in an **external10Docker container** reached over the Docker network — you talk to it through its11HTTP API, never the local filesystem.1213`agentbox.toml`'s `skills.media.comfyui_builtin = false` and this skill's14`mcp.json` entry `"x-agentbox-gate": "env:ENABLE_COMFYUI_EXTERNAL"` name the15same fact: ComfyUI is not baked into the image, it runs externally.1617## Container architecture (read first)1819ComfyUI runs in an EXTERNAL Docker container, not locally. When calling from Claude20Code (its own container), pick the endpoint that matches where you are:2122| Scenario | Endpoint | Notes |23|----------|----------|-------|24| From Claude Code container | `http://comfyui:8188` | Docker network hostname |25| From host machine | `http://localhost:8188` | Port exposed to host |26| Container IP (fallback) | `http://172.18.0.X:8188` | Check with `ping comfyui` |2728Networking rules that actually bite:291. From inside the Claude Code container, `localhost:8188` will not reach ComfyUI —30 use the `comfyui` Docker hostname.312. You cannot read the container filesystem; retrieve outputs via32 `/view?filename=...&type=output`, not filesystem paths.333. The comfyui container's volume mounts (output/input/models under34 `/mnt/mldata/.../comfyui/...`) are host-accessible only, not from here.3536### Check container status3738From the Claude Code container, use the HTTP health check — this is the canonical39liveness probe and needs no Docker access:40```bash41ping -c1 comfyui # Should show IP like 172.18.0.X42curl -s http://comfyui:8188/system_stats | jq '.devices[0].name'43```4445> **Docker-daemon diagnostics (no `sudo`).** agentbox mounts the host Docker socket,46> so plain `docker` talks to the host daemon from inside the container. Do **not**47> prefix with `sudo` — it is blocked by `no-new-privileges` and will fail:48> ```bash49> docker ps --filter "name=comfyui"50> docker logs comfyui --tail 2051> ```52> Prefer the `comfyui:8188` HTTP check above; only fall back to these when the HTTP53> probe is inconclusive.5455## Quick path5657To build or repair the local GPU service, follow58[`references/sidecar-operations.md`](references/sidecar-operations.md).5960For resumable video jobs, use `scripts/comfy_client.py`; read61[`references/agent-kit.md`](references/agent-kit.md) for graph validation and durable62submission receipts. Local video model setup and workflows are documented in63[`references/video-models.md`](references/video-models.md). For a complete explainer64of the current repository, start with `codebase-video`.6566Generate a FLUX 2 image end-to-end with the bundled runnable script:6768```bash69comfyui-generate \70 "A stunning landscape at golden hour, cinematic lighting" output.png71```7273It submits the current FLUX 2 workflow to `http://comfyui:8188`, polls to74completion, and downloads the PNG. For the manual step-by-step (health check →75submit → poll → download), the one-liner variant, VRAM freeing, and the live76model/node tables, see [`references/flux2-quickstart.md`](references/flux2-quickstart.md).7778## Capabilities7980- Text-to-image (text2img) and image-to-image (img2img) generation81- Author and execute node-based workflows programmatically82- Video generation (AnimateDiff, CogVideoX, HunyuanVideo, LTX, Mochi, WAN, Cosmos)83- Manage models, LoRAs, checkpoints, VAEs84- Upscaling and post-processing85- Deploy to Salad Cloud for distributed GPU compute at scale8687## When to use this skill8889- Generate AI images from text descriptions or transform image-to-image90- Design ComfyUI workflows programmatically91- Batch-process generation tasks92- Use or fine-tune LoRA models with FLUX/SD93- Generate AI video from text or images94- Deploy image generation at scale across distributed GPUs9596## When not to use9798- 2D image manipulation (resize, crop, format convert) — use the **imagemagick** skill99- 3D modelling and scene creation — use the **blender** skill100- Video transcoding, editing, or audio extraction — use the **ffmpeg-processing** skill101- Diagrams, flowcharts, architecture visuals — use the **mermaid-diagrams** skill102- ML model training (classification, NLP, time series) — use **pytorch-ml** or **flow-nexus-neural**103104## References105106Detail lives in `references/` — pull the file that matches the task:107108- [`references/flux2-quickstart.md`](references/flux2-quickstart.md) — full FLUX 2109 generate/monitor/download flow, one-liner, VRAM management, current model + node tables.110- [`references/api-and-parameters.md`](references/api-and-parameters.md) — local server111 operations, API endpoints, text2img parameter table, sampler/scheduler lists, output112 conversion, webhooks, error handling, directory layout.113- [`references/workflows.md`](references/workflows.md) — FLUX 2 and legacy FLUX 1 workflow114 JSON structures, supported image/video models, batch-generation Python.115- [`references/salad-cloud.md`](references/salad-cloud.md) — Salad SDK deployment, the full116 recipe catalog (image/video/LLM), hardware recommendations, benchmarks, performance notes.117118Bundled runnable assets in this directory:119- `comfyui-generate` — FLUX 2 one-shot generator (quick path above), on PATH120 from the `agentbox-ops` crate.121- `anima_workflow.json` / `anima_import_workflow.json` — working sample animation122 workflow graphs, kept as reference structures for `generate.py`.123- `mcp-server/` — ComfyUI MCP server surface.124125## Integration with other skills126127- **imagemagick** — post-process generated images128- **ffmpeg-processing** — assemble/transcode generated video129- **blender** — 3D-to-2D workflows130- **pytorch-ml** — custom model training131132## Related skills133134- `art` for editorial illustration, infographics and comics via the Nano Banana image models; ComfyUI is the local-GPU FLUX/Stable Diffusion/video path.