comfyui
БесплатноБез исполняемых скриптовНе проверенComfyUI is a node-based interface and HTTP server for running Stable Diffusion and other diffusion models as graph workflows. Use when a user asks to install…
от TerminalSkills★ 221 звезда на GitHubОб этом скилле
ComfyUI
Overview
ComfyUI (github.com/Comfy-Org/ComfyUI, formerly comfyanonymous/ComfyUI) runs diffusion pipelines as graphs of nodes. The same graph can be built in the browser UI or submitted as JSON to its HTTP API. The server listens on 127.0.0.1:8188 by default and has no authentication, so keep it local or put an authenticating proxy in front of it.
The API format is a dict keyed by node id: each node has a class_type and inputs, where an input is either a literal or a link such as ["4", 1] (output 1 of node 4). In the UI, export it with "Save (API Format)".
Instructions
Step 1: Install
Quickest: comfy-cli.
pip install comfy-cli
comfy install
comfy launch
Manual (Linux/Windows), as in the project README:
git clone https://github.com/Comfy-Org/ComfyUI.git
cd ComfyUI
python -m venv venv && source venv/bin/activate
pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu130 # NVIDIA
pip install -r requirements.txt
python main.py # http://127.0.0.1:8188
The README recommends a cu130 or newer PyTorch build for NVIDIA 20-series and newer; AMD (ROCm), Intel (XPU) and Apple Silicon have their own commands in the README. With no GPU, python main.py --cpu works (slow). Windows users can instead download the portable build from the releases page.
Step 2: Put models where nodes look for them
Checkpoints go in models/checkpoints/, VAEs in models/vae/, LoRAs in models/loras/, ControlNets in models/controlnet/, upscalers in models/upscale_models/. To share a model folder with another UI, copy extra_model_paths.yaml.example to extra_model_paths.yaml and edit the paths.
wget -P models/checkpoints/ \
"https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/resolve/main/sd_xl_base_1.0.safetensors"
# Verify against the SHA-256 Hugging Face publishes for this file (shown on its file page)
echo "31e35c80fc4829d14f90153f4c74cd59c90b779f6afe05a74cd6120b893f7e5b models/checkpoints/sd_xl_base_1.0.safetensors" | sha256sum -c -
The SDXL base file is about 6.9 GB. A node's dropdown only lists files present at server start or refresh.
Step 3: Queue a workflow and collect the result
Verified against ComfyUI 0.42.0: POST /prompt returns a prompt_id, GET /history/{prompt_id} stays empty until the run finishes, and GET /view serves the files.
# txt2img.py
import time, uuid, requests
BASE = "http://127.0.0.1:8188"
workflow = {
"4": {"class_type": "CheckpointLoaderSimple", "inputs": {"ckpt_name": "sd_xl_base_1.0.safetensors"}},
"5": {"class_type": "EmptyLatentImage", "inputs": {"width": 1024, "height": 1024, "batch_size": 1}},
"6": {"class_type": "CLIPTextEncode", "inputs": {"text": "mountain lake at golden hour, photorealistic", "clip": ["4", 1]}},
"7": {"class_type": "CLIPTextEncode", "inputs": {"text": "blurry, low quality, distorted", "clip": ["4", 1]}},
"3": {"class_type": "KSampler", "inputs": {
"seed": 42, "steps": 25, "cfg": 7.5, "sampler_name": "euler_ancestral", "scheduler": "normal",
"denoise": 1.0, "model": ["4", 0], "positive": ["6", 0], "negative": ["7", 0], "latent_image": ["5", 0]}},
"8": {"class_type": "VAEDecode", "inputs": {"samples": ["3", 0], "vae": ["4", 2]}},
"9": {"class_type": "SaveImage", "inputs": {"filename_prefix": "lake", "images": ["8", 0]}},
}
r = requests.post(f"{BASE}/prompt", json={"prompt": workflow, "client_id": str(uuid.uuid4())})
r.raise_for_status() # a bad graph returns HTTP 400 with node_errors
prompt_id = r.json()["prompt_id"]
while True: # poll; the websocket at /ws pushes progress if you need it live
entry = requests.get(f"{BASE}/history/{prompt_id}").json().get(prompt_id)
if entry:
break
time.sleep(1)
for node_id, out in entry["outputs"].items():
for img in out.get("images", []):
data = requests.get(f"{BASE}/view", params={
"filename": img["filename"], "subfolder": img["subfolder"], "type": img["type"]})
open(img["filename"], "wb").write(data.content)
print("saved", img["filename"])
The same seed and graph give the same image; change seed for a new one. GET /queue shows running and pending jobs and GET /object_info/<ClassName> lists a node's inputs and the valid values for dropdowns.
Step 4: ControlNet
Use a ControlNet trained for the same model family as the checkpoint (the SD 1.5 canny file below needs an SD 1.5 checkpoint, not SDXL). Core ComfyUI has a Canny node (thresholds 0.01 to 0.99), so no custom node is needed for edge maps. ControlNetApply is deprecated; use ControlNetApplyAdvanced, which takes and returns both conditionings.
controlnet_nodes = {
"10": {"class_type": "ControlNetLoader", "inputs": {"control_net_name": "control_v11p_sd15_canny.pth"}},
"11": {"class_type": "LoadImage", "inputs": {"image": "sketch.png"}},
Установить comfyui в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл comfyui?
ComfyUI is a node-based interface and HTTP server for running Stable Diffusion and other diffusion models as graph workflows. Use when a user asks to install ComfyUI, generate images from a script through the ComfyUI API, queue a workflow JSON, add ControlNet or LoRA nodes, install custom nodes with ComfyUI-Manager, or poll for results and download the images.
Как установить скилл comfyui?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл comfyui запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic