image-with-comfyui
Use to generate, edit, or animate images and videos through a user-defined ComfyUI server (COMFYUI_URL env var or comfyui_url in config.json; if no server is reachable the script exits with configuration instructions) — trigger with requests like "make a picture of", "replace the background", "cut out / extract the subject of", "turn this into a video", "edit my photo", or "make a 3D mesh of this character". Not for simple non-generation image tweaks. **Qwen-Image 2.1** is the default model for both text-to-image (T2I) and image editing/multi-image (I2I); it can also **cut out / extract the main subject or any image element into a transparent-background image**. Z-Image / SD3.5 (T2I), Qwen Image Edit (2511, single-image), Wan2.2 (I2V), and Hunyuan 3D v2.1 (I2M, image → 3D GLB mesh) are available on request.
Rank
62
Safety
84
Downloads
1.8k
Updated
Oct 10, 2026
Version
3.6.0
Source
CLAWHUB
About
What it does, and when to use it.
Capability contract not published. No trust telemetry is available yet. 1.8K downloads reported by the source. Last updated 10/10/2026.
Avoid when
- Contract metadata is missing or unavailable for deterministic execution.
Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing
Public facts
Every fact links back to the source it came from.
- Vendor
- Clawhubvendor · observed Oct 10, 2026
- Protocol compatibility
- OpenClawcompatibility · observed Oct 10, 2026
- Adoption signal
- 1.8K downloadsadoption · observed Oct 10, 2026
- Latest release
- 3.6.0release · observed Oct 4, 2026
- Handshake status
- UNKNOWNsecurity
Install and run
Setup complexity: low.
clawhub skill install s17ehnmpwm46zw2010e8g6j2z583gzv3:image-with-comfyui- Install using `clawhub skill install s17ehnmpwm46zw2010e8g6j2z583gzv3:image-with-comfyui` in an isolated environment before connecting it to live workloads.
- No published capability contract is available yet, so validate auth and request/response behavior manually.
- Review the upstream CLAWHUB listing at https://clawhub.ai/sunshinejnjn/image-with-comfyui before using production credentials.
Contract: missing
curl -s "https://www.xpersona.co/api/v1/agents/clawhub-sunshinejnjn-image-with-comfyui/snapshot"
Documentation
CLAWHUB
159,828 characters of source documentation, loaded on request.
Extracted files
5 files captured from the source.
SKILL.md
---
name: image-with-comfyui
description: 'Use to generate, edit, or animate images and videos through a user-defined ComfyUI server (COMFYUI_URL env var or comfyui_url in config.json; if no server is reachable the script exits with configuration instructions) — trigger with requests like "make a picture of", "replace the background", "cut out / extract the subject of", "turn this into a video", "edit my photo", or "make a 3D mesh of this character". Not for simple non-generation image tweaks. **Qwen-Image 2.1** is the default model for both text-to-image (T2I) and image editing/multi-image (I2I); it can also **cut out / extract the main subject or any image element into a transparent-background image**. Z-Image / SD3.5 (T2I), Qwen Image Edit (2511, single-image), Wan2.2 (I2V), and Hunyuan 3D v2.1 (I2M, image → 3D GLB mesh) are available on request.'
version: "3.5.0"
license: BSD-3-Clause
compatibility: 'ComfyUI ≥ 0.37.0; requires python3; the endpoint is user-defined (COMFYUI_URL or config.json) — point it at a server you control and trust.'
allowed-tools: Read, Write, Edit, Exec
metadata:
openclaw:
emoji: "🎨"
requires:
anyBins: ["python3"]
config:
path: "config.json"
---
# Image with ComfyUI
Call a user-defined ComfyUI server to generate or edit images and videos, or turn an image into a 3D mesh. **Qwen-Image 2.1** is the default model for both T2I and I2I; Z-Image / SD3.5 (T2I), Qwen Image Edit 2511 (single-image edit), Wan2.2 (I2V), and Hunyuan 3D v2.1 (I2M, image → 3D GLB) are available on request. If no ComfyUI server is reachable, the script exits with configuration instructions (see [README.md](README.md)).
- **T2I** (Text → Image) → **Qwen-Image 2.1** (default) or Z-Image / SD3.5 Medium
- **I2I** (Image → Image / Edit / Multi-image, up to 16 refs) → **Qwen-Image 2.1** (default) or Qwen Image Edit (2511, single image)
- **I2V** (Image → Video) → Wan2.2 model
- **Cutout** (extract the main subject or any image element) → **Qwen-Image 2.1** — redraws the target on a transparent background, producing a clean, alpha-only image; see [Cutout below](#cutout-extract-the-subject).
- **I2M** (Image → 3D Mesh) → **Hunyuan 3D v2.1** — extracts the main character first (transparent PNG), generates a GLB, scales it ×3000, and zips it for delivery
`config.json` at the skill root holds every default; any value can be overridden by an env var (see the Data & Privacy table there).
## Cutout — Extract the Subject
> **Note:** cutout is a genuine image-generation task, not a simple non-generation tweak — use it when the user wants to isolate the subject or any image element from its surroundings.
**Qwen-Image 2.1** can **cut out / extract** the main subject (or a specified element) from an image and return it on a transparent background. The output is a clean PNG with alpha only — it re-draws the target rather than doing a hard pixel mask, so it works well for organic shapes (people, animals, products, characters) and can tarREADME.md
# Image with ComfyUI Call a user-defined ComfyUI server (local or remote) for **text-to-image**, **image-to-image/edit**, **image-to-video**, and **image-to-3D-mesh** generation. **Qwen-Image 2.1** is the default model for both T2I and image editing (including multi-image reference composition); Z-Image, SD3.5 Medium, Qwen Image Edit (2511), Wan2.2, and Hunyuan 3D v2.1 (3D mesh) are available as options. > **New here?** Qwen-Image 2.1 needs a one-time ComfyUI setup — see [Qwen-Image 2.1 ComfyUI Setup](#qwen-image-21-comfyui-setup). ## Quick Start 1. **Ensure a ComfyUI server is running** (locally, or on a host you can reach). 2. **Set the URL** (via environment variable or `config.json`). The endpoint is user-defined — the bundled default is `http://127.0.0.1:8188`; point `COMFYUI_URL` at any ComfyUI server you control — a data-flow warning is printed on every run for non-local hosts. If no server is reachable, the script exits with configuration instructions: ```bash export COMFYUI_URL=http://comfyui.host:api-port ``` 3. **Test a workflow** (see [Testing](#testing) below). ## Configuration Read `config.json` at the skill root. All values can be overridden by environment variables: | Env Variable | Overrides | Default | |---|---|---| | `COMFYUI_URL` | `comfyui_url` | `http://localhost:8188` | | `COMFYUI_TIMEOUT` | `timeout_seconds` | `120` | | `COMFYUI_POLL_INTERVAL` | `poll_interval_seconds` | `1` | | `COMFYUI_KEEP_MODELS_RESIDENT` | `keep_models_resident` | `false` | | `COMFYUI_OUTPUT_DIR` | `output_dir` | `media/comfyui` | | `COMFYUI_APIKEY` | `comfyui_api_key` | _(none → no auth header)_ | **Priority:** Environment variables > `config.json`. > Note: The config.json key `comfyui_api_key` (string) is optional. When empty/absent, **no** `Authorization` header is added and behavior is unchanged. When set, every ComfyUI API request carries `Authorization: Bearer <key>` (env var wins over the config value). ### 🔒 ComfyUI API Key (Bearer Auth) If your ComfyUI instance requires an API key, set it via either of these (env var takes precedence): ```bash export COMFYUI_APIKEY=sk-your-key ``` or, in `config.json`: ```json "comfyui_api_key": "sk-your-key" ``` When present, the skill adds `Authorization: Bearer <key>` to all ComfyUI API calls (`/prompt`, `/history`, `/object_info`, `/upload/image`, `/view`, `/upload/*`). Do not commit your key to version control — prefer the env var, and never paste it into the chat or logs. > **⚠️ This skill only *sends* the key — it doesn't authenticate your ComfyUI itself.** For the Bearer key to be honored, the ComfyUI server must run an authentication custom node that recognizes that key. The reference implementation is [`sunshinejnjn/comfyui-auth`](https://github.com/sunshinejnjn/comfyui-auth) (a fork of the original [`ivellioscolin/comfyui-auth`](https://github.com/ivellioscolin/comfyui-auth)). To set it up: > 1. Clone it into your ComfyUI: `git clone https://github.com/sunshinejnjn/comfyui
_meta.json
{
"ownerId": "kn7dn131pvgfaveyzzzcrc5xf182yb84",
"slug": "image-with-comfyui",
"version": "3.6.0",
"publishedAt": 1791136664035
}references/attribution.md
# Source Attribution (image-with-comfyui) Every workflow in `workflows/` is an **adapted** version of a real ComfyUI workflow. Original source + the specific modifications applied by this skill are documented here. The workflow JSONs carry only ComfyUI's standard per-node labels (`_meta` `title`); they do **not** embed provenance or attribution metadata, so the original source is not duplicated inside them — it lives here instead, and each file stays runnable. | Workflow | Original source | Key modifications applied | |---|---|---| | `qwen_image_2.1_api.json` | [foprc/qwen-image-2.1-comfyui-workflow](https://github.com/foprc/qwen-image-2.1-comfyui-workflow) (ships GGUF Q8_0 + ComfyUI-GGUF) | Replaced GGUF model with standard **safetensors** via `UNETLoader` (`weight_dtype: fp8_e4m3fn_fast`) — removes the ComfyUI-GGUF dependency; added `UnloadModel` (node 18) + `UnloadAllModels` (node 19) VRAM-cleanup; dual-mode reference switch (nodes 12/13/14); `ResolutionSelector` (node 9); API/`timestamp` output | | `qwen_image-edit_api.json` | Qwen-Image-Edit (Comfy-Org) default edit graph | Prompt auto-routing to the positive `TextEncodeQwenImageEditPlus` node (115:111) by the script | | `sd3.5-med_t2i_api.json` | Comfy-Org / sd3-medium default graph | Fixed the `.safetensors.safetensors` double-suffix `ckpt_name` bug; `sd3_medium` → `sd3.5_large.safetensors` fallback; `UnloadAllModels` VRAM-cleanup | | `z-image_t2i_api.json` | Comfy-Org / z-image default graph | `UnloadAllModels` VRAM-cleanup | | `wan2.2_i2v_api.json` | Comfy-Org / Wan2.2 I2V default graph | Pointed the diffusion model at **4-step Lightspeed** weights; LoRA stack nodes (109/110); `UnloadAllModels` VRAM-cleanup | | `hunyuan3d-v2.1_i2m_api.json` | Tencent Hunyuan3D-2.1 ComfyUI image→mesh reference graph (user-supplied, [tencent/Hunyuan3D-2.1](https://huggingface.co/tencent/Hunyuan3D-2.1)) | Topology kept 1:1 (including the user's VRAM-unload sink nodes 19/20/21/22); placeholder `image` set to `character.png` (the script always rewrites it to the uploaded filename); default `filename_prefix` kept (`mesh/hy21`) — the script stamps it per run to `mesh/i2m_<timestamp>`; no model/parameter changes — resolution 4096 / 30 steps / CFG 5.0 are the graph's own defaults and stay the skill defaults All six are **adapted** (as opposed to) the original; they add prompt routing, resolution selection, dual-mode switches, and VRAM management on top of the original ComfyUI graphs.
references/cli-reference.md
# CLI Usage Reference (image-with-comfyui) Full command examples for every subcommand. The SKILL.md procedure only lists the core rule; open this file for the exact flags. > **⚠️ The prompt is MANDATORY and must be passed via `--prompt` — never as a positional argument.** > > Every subcommand that takes a prompt (`t2i`, `i2i`, `wan2.2`) reads it from `--prompt "..."` (`i2m` has no prompt — see below). Passing the prompt as a bare positional word fails immediately with exit code 2: > `python3 image_with_comfyui.py t2i "some description"` → `t2i: error: the following arguments are required: --prompt` > > This is a **100%-avoidable failure loop** — the model can't help you because the command never reaches ComfyUI. Always write the prompt through the `--prompt` flag on the first attempt. ### T2I (Text → Image) ```bash # Qwen-Image 2.1 (default model; CFG locked to 1.0 — no --cfg) # --aspect is OPTIONAL: omit it and the output is 1:1 (1024x1024) python3 image_with_comfyui.py t2i \ --prompt "Your detailed image description" \ --steps 25 # With a negative prompt (Qwen-Image 2.1 supports it) python3 image_with_comfyui.py t2i \ --prompt "A detailed image description" \ --negative "text, watermark, blurry" \ --steps 25 # Request a specific aspect ratio explicitly (16:9, 9:16, 4:3, ...) python3 image_with_comfyui.py t2i \ --prompt "Your detailed image description" \ --aspect 16:9 \ --steps 25 # Z-Image python3 image_with_comfyui.py t2i \ --model z-image \ --prompt "Your detailed image description" \ --aspect 1:1 \ --steps 9 # SD3.5 Medium (defaults to 1:1) python3 image_with_comfyui.py t2i \ --model sd35 \ --prompt "A beautiful sunset over mountains" \ --negative "text, watermark, blurry" \ --steps 20 \ --cfg 5.5 # Run ONLY the requested model (skip the runtime fallback chain) python3 image_with_comfyui.py t2i \ --prompt "..." --model z-image --no-fallback # JPG output (converted client-side; default from config.json image.output_format) python3 image_with_comfyui.py t2i \ --prompt "..." --format jpg --jpg-quality 90 ``` ### I2I (Edit Image) ```bash # Qwen-Image 2.1 (default I2I) python3 image_with_comfyui.py i2i \ --prompt "Change background to a beach" \ --image /path/to/source.jpg \ --steps 25 # Explicit aspect ratio: routes the I2I latent canvas through the # ResolutionSelector (workflow latent switch OFF) instead of matching the # first reference image's size, so a portrait photo CAN become 16:9 landscape. # The reference is uploaded at native size, never stretched. Without --aspect, # the output follows the first reference image's own size (no 1:1 forcing). python3 image_with_comfyui.py i2i \ --prompt "Extend the scene into a wide landscape" \ --image /path/to/portrait.jpg \ --aspect 16:9 # Multi-image reference (up to 16): --image order = slot order python3 image_with_comfyui.py i2i \ --prompt "put the shirt from <image2> on the person in <image1>" \ --image /path/to/base.jpg /path
AionUi
Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!
activepieces
AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
cherry-studio
AI productivity studio with smart chat, autonomous agents, and 300+ assistants.
CopilotKit
The Frontend for Agents & Generative UI. React + Angular
Machine-readable data
The same record, as JSON, for agents and crawlers.
{
"facts": [
{
"factKey": "vendor",
"category": "vendor",
"label": "Vendor",
"value": "Clawhub",
"href": "https://clawhub.ai/sunshinejnjn/skills/image-with-comfyui",
"sourceUrl": "https://clawhub.ai/sunshinejnjn/skills/image-with-comfyui",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-10T00:30:13.191Z",
"isPublic": true
},
{
"factKey": "protocols",
"category": "compatibility",
"label": "Protocol compatibility",
"value": "OpenClaw",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-sunshinejnjn-image-with-comfyui/contract",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-sunshinejnjn-image-with-comfyui/contract",
"sourceType": "contract",
"confidence": "medium",
"observedAt": "2026-10-10T00:30:13.191Z",
"isPublic": true
},
{
"factKey": "traction",
"category": "adoption",
"label": "Adoption signal",
"value": "1.8K downloads",
"href": "https://clawhub.ai/sunshinejnjn/image-with-comfyui",
"sourceUrl": "https://clawhub.ai/sunshinejnjn/image-with-comfyui",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-10T00:30:13.191Z",
"isPublic": true
},
{
"factKey": "latest_release",
"category": "release",
"label": "Latest release",
"value": "3.6.0",
"href": "https://clawhub.ai/sunshinejnjn/image-with-comfyui",
"sourceUrl": "https://clawhub.ai/sunshinejnjn/image-with-comfyui",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-10-04T17:57:44.035Z",
"isPublic": true
},
{
"factKey": "handshake_status",
"category": "security",
"label": "Handshake status",
"value": "UNKNOWN",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-sunshinejnjn-image-with-comfyui/trust",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-sunshinejnjn-image-with-comfyui/trust",
"sourceType": "trust",
"confidence": "medium",
"observedAt": null,
"isPublic": true
}
],
"events": [
{
"eventType": "release",
"title": "Release 3.6.0",
"description": "Added documentation that Qwen-Image 2.1 can cut out / extract the subject or any image element into a transparent-background image.",
"href": "https://clawhub.ai/sunshinejnjn/image-with-comfyui",
"sourceUrl": "https://clawhub.ai/sunshinejnjn/image-with-comfyui",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-10-04T17:57:44.035Z",
"isPublic": true
}
]
}Record generated Oct 10, 2026.
