Claude-skill-registry comfyui
git clone https://github.com/majiayu000/claude-skill-registry
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/comfyui" ~/.claude/skills/majiayu000-claude-skill-registry-comfyui && rm -rf "$T"
skills/data/comfyui/SKILL.mdComfyUI - Stable Diffusion Interface
Overview
ComfyUI is a powerful node-based Stable Diffusion interface for AI image generation. The
comfyui command manages the ComfyUI container, including configuration, lifecycle management, model downloads, and custom node management.
Key Concept: This is a system command - run with
ujust from anywhere on the system. ComfyUI runs as a Podman Quadlet service. By default, data is ephemeral (stored inside the container). Configure volume mounts for persistent storage.
Quick Reference
| Action | Command | Description |
|---|---|---|
| Config | | Configure ComfyUI |
| Start | | Start ComfyUI server |
| Stop | | Stop ComfyUI server |
| Restart | | Restart ComfyUI server |
| Status | | Show status and model counts |
| Logs | | View service logs |
| Open | | Open UI in browser |
| Shell | | Open shell in container |
| Download model | | Download from CivitAI |
| List models | | List installed models |
| Install node | | Install custom node |
| List nodes | | List custom nodes |
| Update nodes | | Update all nodes |
| Delete | | Remove ComfyUI and images |
Configuration
Parameters
| Parameter | Long Flag | Short | Default | Description |
|---|---|---|---|---|
| Port | | | | Web UI port |
| GPU Type | | | | GPU: nvidia/amd/intel/auto |
| Image | | | (default image) | Container image |
| Tag | | | | Image tag |
| Models Dir | | - | (empty) | Path for SD models |
| Output Dir | | - | (empty) | Path for generated images |
| Input Dir | | - | (empty) | Path for input images |
| Nodes Dir | | - | (empty) | Path for custom nodes |
| Workspace | | | (empty) | Optional mount to /workspace |
| Bind | | | | Bind address |
| Lines | | | | Log lines to show |
| Instance | | | | Instance number |
Important: All directory parameters default to empty. When empty, data is stored inside the container and will be lost when the container is recreated. For persistent storage, provide explicit paths.
Configuration Examples
# Ephemeral mode - no persistent storage (data lost on container recreation) ujust comfyui config # Persist models only (most common) ujust comfyui config --models-dir=/data/models # Persist models and output ujust comfyui config --models-dir=/data/models --output-dir=/data/output # Persist models and custom_nodes ujust comfyui config --models-dir=/data/models --nodes-dir=/data/nodes # All directories with custom port and GPU ujust comfyui config --models-dir=/data/models --output-dir=/data/output \ --input-dir=/data/input --nodes-dir=/data/nodes --port=8189 --gpu-type=nvidia # With short forms ujust comfyui config -p 8189 -g nvidia --models-dir=/data/models # Network-wide access ujust comfyui config --bind=0.0.0.0
Update Existing Configuration
Running
config when already configured will update the existing configuration, preserving values not explicitly changed:
# Initially configured with defaults ujust comfyui config # Later, add models directory (other settings preserved) ujust comfyui config --models-dir=/data/models
Shell Access
# Interactive bash shell ujust comfyui shell # Run specific command (use -- separator) ujust comfyui shell -- pip list ujust comfyui shell -- nvidia-smi
Model Downloads
download
ujust comfyui download --model-url=<URL> --model-type=<TYPE>
| Parameter | Flag | Description |
|---|---|---|
| URL | | CivitAI URL, model ID, or direct download URL |
| Type | | Model type (see below) |
Requires:
--models-dir must be configured (not ephemeral)
Model Types:
| Type | Directory | Description |
|---|---|---|
| checkpoints/ | Main SD models |
| loras/ | LoRA adapters |
| vae/ | VAE models |
| embeddings/ | Textual inversions |
| controlnet/ | ControlNet models |
| upscale_models/ | Upscaler models |
Download Examples
# By CivitAI URL ujust comfyui download --model-url=https://civitai.com/models/101055 --model-type=checkpoint # By model ID ujust comfyui download --model-url=101055 --model-type=checkpoint # LoRA model ujust comfyui download --model-url=123456 --model-type=lora # Direct URL ujust comfyui download --model-url=https://example.com/model.safetensors --model-type=vae
Custom Nodes
node-install
ujust comfyui node-install --node-url=<GIT_URL>
Requires:
--nodes-dir must be configured (not ephemeral)
| Parameter | Flag | Description |
|---|---|---|
| GIT_URL | | Git repository URL for custom node |
Popular Custom Nodes
# ComfyUI-Manager (recommended) ujust comfyui node-install --node-url=https://github.com/ltdrdata/ComfyUI-Manager # Impact Pack ujust comfyui node-install --node-url=https://github.com/ltdrdata/ComfyUI-Impact-Pack # ControlNet Aux ujust comfyui node-install --node-url=https://github.com/Fannovel16/comfyui_controlnet_aux # List installed nodes ujust comfyui node-list # Update all nodes ujust comfyui node-update
Data Storage
Ephemeral Mode (Default)
When no directories are configured, ComfyUI uses internal container directories:
- Data is stored inside the container
- All data is lost when container is recreated
- Suitable for testing or temporary use
Persistent Mode
When directories are configured, they are mounted into the container:
/path/to/models/ # Your MODELS_DIR ├── checkpoints/ # Main SD models (.safetensors, .ckpt) ├── loras/ # LoRA adapters ├── vae/ # VAE models ├── embeddings/ # Textual inversions ├── controlnet/ # ControlNet models └── upscale_models/ # Upscaler models /path/to/output/ # Your OUTPUT_DIR - generated images /path/to/input/ # Your INPUT_DIR - input images for img2img /path/to/custom_nodes/ # Your CUSTOM_NODES_DIR - node extensions
Common Workflows
Initial Setup (Persistent)
# 1. Configure with persistent models directory ujust comfyui config --models-dir=/data/comfyui/models # 2. Download a checkpoint model ujust comfyui download --model-url=https://civitai.com/models/101055 --model-type=checkpoint # 3. Start ComfyUI ujust comfyui start # 4. Open in browser ujust comfyui open
Quick Test (Ephemeral)
# 1. Configure with defaults (ephemeral) ujust comfyui config # 2. Start ComfyUI ujust comfyui start # 3. Open in browser ujust comfyui open # Note: Download models via the UI - they will be lost on container recreation
Daily Usage
# Start ComfyUI ujust comfyui start # Open in browser ujust comfyui open # View logs ujust comfyui logs # Stop when done ujust comfyui stop
GPU Support
ComfyUI automatically detects and configures GPU acceleration:
| GPU | Configuration | Performance |
|---|---|---|
| NVIDIA | CDI device passthrough | Full CUDA acceleration |
| AMD | /dev/dri + /dev/kfd | ROCm acceleration |
| Intel | /dev/dri | oneAPI acceleration |
| CPU | Fallback mode | Very slow (not recommended) |
NVIDIA Setup
If NVIDIA GPU is not detected:
# Generate CDI specification sudo nvidia-ctk cdi generate --output=/etc/cdi/nvidia.yaml # Reconfigure ComfyUI ujust comfyui delete ujust comfyui config /data/models
Troubleshooting
Model/Node Commands Fail
Symptom: "No MODELS_DIR configured" or "No CUSTOM_NODES_DIR configured"
Cause: Using ephemeral mode (no directories configured)
Fix: Reconfigure with persistent directories:
# Add models directory ujust comfyui config --models-dir=/path/to/models # Or add both models and custom_nodes ujust comfyui config --models-dir=/path/to/models --nodes-dir=/path/to/nodes
Model Not Appearing
Symptom: Downloaded model not visible in ComfyUI
Fix:
# Restart ComfyUI to reload models ujust comfyui restart # Verify model is in correct directory ls /path/to/your/models/checkpoints/
CivitAI Download Fails
Symptom: Cannot download from CivitAI
Cause: Model requires authentication or is restricted
Fix:
# Download manually and place in appropriate directory mv ~/Downloads/model.safetensors /path/to/models/checkpoints/
Out of Memory
Symptom: CUDA out of memory error
Fix: Check logs and consider using smaller models or lower precision:
ujust comfyui logs
Service Won't Start
Symptom: ComfyUI fails to start
Fix:
# Check logs for errors ujust comfyui logs # Verify GPU access nvidia-smi # Delete and reconfigure ujust comfyui delete ujust comfyui config --models-dir=/data/models
Configuration Files
| File | Purpose | Location |
|---|---|---|
| Instance config | Settings | |
| Quadlet file | Service definition | |
Cross-References
- Related Skills:
(LLM inference),ollama
(notebooks)jupyter - Pod Building: See
skill for developers/bazzite-ai-dev:build - ComfyUI Docs: https://github.com/comfyanonymous/ComfyUI
- ComfyUI-Manager: https://github.com/ltdrdata/ComfyUI-Manager
- CivitAI: https://civitai.com/
When to Use This Skill
Use when the user asks about:
- "comfyui", "stable diffusion", "image generation"
- "download model", "civitai", "checkpoint", "lora"
- "custom nodes", "comfyui manager"
- "ujust comfyui", "start comfyui", "configure comfyui"
- "gpu image generation", "ai art"