The most complete, up-to-date ComfyUI guide for 2026. From installation to advanced workflows — no outdated info.
Version info: Covers ComfyUI v0.19+, ComfyUI Manager v0.3.76+, Frontend v1.44+
- What is ComfyUI?
- System Requirements
- Installation
- First Launch
- Understanding the Interface
- Core Concepts
- Supported Models
- Essential Custom Nodes
- Workflows
- Model Download Guide
- Folder Structure
- ComfyUI Manager
- Performance & VRAM Tips
- Common Errors & Fixes
- API & Automation
- Building Custom Nodes (V3)
- Useful Resources
- Communities
ComfyUI is a free, open-source node-based interface for running AI image and video generation models locally. Instead of a simple text box, you wire each step of the pipeline visually — load model → encode prompt → sample → decode → save.
Why use ComfyUI over other UIs?
- Full control over every step of generation
- Supports new models on day one (FLUX, Wan, SDXL, SD3.5, etc.)
- Workflows are portable JSON files — share and reuse
- 114,000+ GitHub stars as of 2026
- Active development — new core release every ~2 weeks
- Free and runs fully offline on your hardware
GitHub: https://github.com/comfyanonymous/ComfyUI
Official Docs: https://docs.comfy.org/
| Component | Requirement |
|---|---|
| GPU | NVIDIA GTX 1060 6GB / AMD RX 580 8GB |
| RAM | 16 GB |
| Storage | 20 GB free (more for models) |
| OS | Windows 10/11, Ubuntu 20.04+, macOS 12+ |
| Component | Requirement |
|---|---|
| GPU | NVIDIA RTX 3060 12GB or better |
| RAM | 32 GB |
| Storage | 100 GB SSD |
| VRAM | 12 GB+ for FLUX, 8 GB for SDXL |
- NVIDIA RTX 40 series — Ampere/Ada architecture, FP16/BF16 native support
- RTX 3090 / 4090 — Best for FLUX.1 and video models
- As of March 2026, ComfyUI has dynamic VRAM management enabled by default — unloads unused models between steps automatically
See Cloud section below.
- Go to https://github.com/comfyanonymous/ComfyUI/releases
- Download
ComfyUI_windows_portable_nvidia.7z(NVIDIA) orComfyUI_windows_portable_amd.7z(AMD) - Extract with 7-Zip
- Run
run_nvidia_gpu.batorrun_cpu.bat - Open browser at
http://127.0.0.1:8188
# Requirements: Python 3.11+, Git, CUDA 12.1+
git clone https://github.com/comfyanonymous/ComfyUI
cd ComfyUI
pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu121
pip install -r requirements.txt
python main.py- Official desktop app available at https://www.comfy.org/
- One-click install, auto-updates, built-in model manager
- Recommended for beginners
# Requirements: macOS 12+, Python 3.11+, Homebrew
git clone https://github.com/comfyanonymous/ComfyUI
cd ComfyUI
pip install torch torchvision torchaudio
pip install -r requirements.txt
python main.pyApple Silicon (M1/M2/M3/M4) is supported via MPS backend. Performance is good for SDXL, slower for FLUX.
# Ubuntu / Debian
git clone https://github.com/comfyanonymous/ComfyUI
cd ComfyUI
# Create virtual environment (recommended)
python3 -m venv venv
source venv/bin/activate
pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu121
pip install -r requirements.txt
python main.py --listen 0.0.0.0Run ComfyUI without a local GPU:
| Platform | Notes | Link |
|---|---|---|
| Google Colab | Free tier available, T4 GPU | Notebook |
| RunPod | Affordable GPU rental, ComfyUI template available | Site |
| Thunder Compute | ComfyUI cloud with persistent storage | Site |
| Vast.ai | Cheap GPU rentals | Site |
| Comfy.org Cloud | Official cloud by ComfyUI team | Site |
- Open browser at
http://127.0.0.1:8188 - You'll see a default workflow with basic nodes
- Click Queue Prompt to run your first generation
- Output saves to
ComfyUI/output/folder
Useful launch flags:
python main.py --lowvram # For GPUs with less than 6GB VRAM
python main.py --cpu # Run on CPU (very slow)
python main.py --listen # Allow network access
python main.py --port 8189 # Change port
python main.py --auto-launch # Auto-open browser
python main.py --fast # Enable fast mode (2026+)┌─────────────────────────────────────────────────┐
│ Menu Bar │ Queue │ Settings │ Manager │
├─────────────────────────────────────────────────┤
│ │
│ Node Canvas (Main Area) │
│ [Node] ──► [Node] ──► [Node] ──► [Node] │
│ │
├─────────────────────────────────────────────────┤
│ Queue Status │ Progress Bar │
└─────────────────────────────────────────────────┘
Key interactions:
Right-clickcanvas → Add nodeDouble-clickcanvas → Search nodesCtrl+Z→ UndoCtrl+S→ Save workflowCtrl+O→ Load workflowH→ Fit view to screenCtrl+A→ Select all nodes- Middle mouse drag → Pan canvas
- Scroll wheel → Zoom
Every operation in ComfyUI is a node. Nodes have:
- Inputs (left side, colored dots)
- Outputs (right side, colored dots)
- Widgets (settings inside the node)
Connect nodes by dragging from an output dot to an input dot. Colors must match (yellow = latent, purple = conditioning, green = image, etc.)
A complete connected graph of nodes that produces an output. Saved as .json files.
| Node | Purpose |
|---|---|
Load Checkpoint |
Load a Stable Diffusion model |
CLIP Text Encode |
Convert text prompt to conditioning |
KSampler |
Main sampling/generation node |
VAE Decode |
Convert latent to image |
Save Image |
Save output to disk |
Load Image |
Load an image as input |
LoRA Loader |
Apply a LoRA to the model |
Images are processed in latent space (compressed representation) and decoded to pixels at the end. This is why you need a VAE Decode node at the end of every image workflow.
| Model | VRAM Needed | Best For | Download |
|---|---|---|---|
| FLUX.1-dev | 12–24 GB | Best quality images | HuggingFace |
| FLUX.1-schnell | 8–12 GB | Fast generation | HuggingFace |
| FLUX.2-dev | 16–24 GB | Latest FLUX model | HuggingFace |
| SDXL 1.0 | 6–8 GB | Balanced quality/speed | HuggingFace |
| SD 3.5 Large | 10–16 GB | High quality SD model | HuggingFace |
| SD 3.5 Medium | 6–8 GB | Lighter SD 3.5 | HuggingFace |
| Illustrious XL | 6–8 GB | Anime/illustration | CivitAI |
| Pony Diffusion XL | 6–8 GB | Stylized art | CivitAI |
| Model | VRAM Needed | Best For | Download |
|---|---|---|---|
| Wan 2.6 | 16–24 GB | Text-to-video, restyling | HuggingFace |
| Wan 2.1 | 12–16 GB | Stable video generation | HuggingFace |
| CogVideoX-5B | 16–24 GB | Long video generation | HuggingFace |
| AnimateDiff | 8–12 GB | Animate still images | HuggingFace |
| Mochi 1 | 20–24 GB | High quality video | HuggingFace |
- HuggingFace — https://huggingface.co/models
- CivitAI — https://civitai.com/ (community models, LoRAs)
- ComfyUI Manager — Built-in model downloader
Install all via ComfyUI Manager (search by name).
| Node Pack | What it Does | Install Name |
|---|---|---|
| ComfyUI Manager | Install/manage all other nodes | ComfyUI-Manager |
| ComfyUI-Impact-Pack | Detailer, face fix, segmentation | ComfyUI-Impact-Pack |
| ComfyUI_IPAdapter_plus | Style and face transfer | ComfyUI_IPAdapter_plus |
| ComfyUI-Advanced-ControlNet | Advanced ControlNet workflows | ComfyUI-Advanced-ControlNet |
| ComfyUI_InstantID | Face identity preservation | ComfyUI_InstantID |
| ComfyUI-VideoHelperSuite | Video input/output tools | ComfyUI-VideoHelperSuite |
| ComfyUI-AnimateDiff-Evolved | AnimateDiff video workflows | ComfyUI-AnimateDiff-Evolved |
| rgthree-comfy | Utility nodes, reroute, fast groups | rgthree-comfy |
| Efficiency Nodes | Streamlined workflow nodes | efficiency-nodes-comfyui |
| WAS Node Suite | 100+ utility nodes | was-node-suite-comfyui |
| ComfyUI-Crystools | Resource monitor, profiling | ComfyUI-Crystools |
| ComfyUI-KJNodes | Utility nodes for video/image | ComfyUI-KJNodes |
| ComfyUI-GGUF | Run FLUX and other models in GGUF format (less VRAM) | ComfyUI-GGUF |
| Node Pack | Purpose |
|---|---|
| x-flux-comfyui | FLUX ControlNet and tools |
| ComfyUI-FluxTrainer | Fine-tune FLUX locally |
| JLC Flux2 ControlNet | FLUX.2 ControlNet support (2026) |
| Node Pack | Purpose |
|---|---|
| ComfyUI-WanVideoWrapper | Wan 2.1/2.6 video workflows |
| ComfyUI-CogVideoX-wrapper | CogVideoX video generation |
| ComfyUI-Frame-Interpolation | RIFE frame interpolation |
Basic SDXL workflow nodes:
Load Checkpoint (SDXL)
↓
CLIP Text Encode (positive prompt) ──┐
CLIP Text Encode (negative prompt) ──┤
↓
KSampler
↓
VAE Decode
↓
Save Image
Basic FLUX workflow nodes:
FLUX uses 3 separate loaders instead of one Load Checkpoint
UNETLoader (flux1-dev.safetensors) ──────────────┐
DualCLIPLoader (t5xxl + clip_l) ──► CLIPTextEncode ──► FluxGuidance
VAELoader ───────────────────────────────────────┤
↓
KSampler (euler, simple)
↓
VAE Decode
↓
Save Image
FLUX recommended settings:
- Sampler:
euler - Scheduler:
simple - Steps:
20–28 - CFG:
1.0(FLUX ignores CFG, keep at 1) - Use
FluxGuidancenode instead of CFG — set to3.5
Add these nodes to a basic workflow:
Load Image ──► VAE Encode ──► KSampler (set denoise to 0.5–0.8)
- Denoise 0.3 = subtle changes
- Denoise 0.7 = significant changes
- Denoise 1.0 = completely ignore input image
Required nodes:
Load Image ──► Load Image (mask) ──► VAE Encode (Inpaint) ──► KSampler
Or use the InpaintModelConditioning node for better results with inpainting-specific models.
Wan 2.1/2.6 workflow:
WanVideoModelLoader ──────────────────┐
WanVideoTextEncode (pos + neg) ────── ►WanVideoSampler
WanVideoVAELoader ─────────────────── ┘
↓
VHS_VideoCombine (VideoHelperSuite)
Tips:
- Resolution: 480p or 720p for less VRAM
- Duration: 4–8 seconds recommended
- Use
--lowvramflag if running out of memory
Load Image ──► WanVideoImageEncode ──► WanVideoSampler ──► VHS_VideoCombine
ControlNet lets you control the composition of generated images using reference images.
Common ControlNet types:
| Type | Controls |
|---|---|
| Canny | Edges and outlines |
| Depth | 3D depth information |
| OpenPose | Human body pose |
| Lineart | Clean line art |
| Scribble | Rough sketches |
| Normal Map | Surface normals |
| IP-Adapter | Style and face transfer |
Basic ControlNet nodes:
Load Image ──► AIO_Preprocessor ──► ControlNetApply
Load ControlNet Model ────────────► ControlNetApply
↓
(connect to KSampler conditioning)
FLUX ControlNet (2026):
- Use
x-flux-comfyuiorJLC Flux2 ControlNetnodes - Supports Canny, Depth, Pose for FLUX models
- FLUX ControlNet models: download from HuggingFace
black-forest-labs/FLUX.1-canny-dev
FLUX LoRA:
UNETLoader ──► LoraLoaderModelOnly ──► KSampler
Note: FLUX LoRAs load differently than SD LoRAs — use LoraLoaderModelOnly node
Generated Image ──► ImageScaleBy (2x) ──► Ultimate SD Upscale
↓
Save Image
Or use Topaz Video AI for video upscaling outside ComfyUI.
Recommended upscaler models:
4x-UltraSharp— Best for photos4x_NMKD-Siax_200k— Best for animeRealESRGAN_x4plus— General purpose
ComfyUI/
└── models/
├── checkpoints/ ← SD, SDXL, SD3.5 .safetensors files
├── unet/ ← FLUX unet files (flux1-dev.safetensors)
├── clip/ ← FLUX text encoders (t5xxl, clip_l)
├── vae/ ← VAE files
├── loras/ ← LoRA files
├── controlnet/ ← ControlNet models
├── upscale_models/ ← Upscaler models
└── ipadapter/ ← IP-Adapter models
- Open ComfyUI → Manager → Model Manager
- Search for model name
- Click Download
- Model auto-placed in correct folder
pip install huggingface_hub
huggingface-cli download black-forest-labs/FLUX.1-dev flux1-dev.safetensors --local-dir ./models/unet/ComfyUI/
├── main.py ← Launch file
├── requirements.txt
├── models/ ← All AI models go here
│ ├── checkpoints/
│ ├── unet/
│ ├── clip/
│ ├── vae/
│ ├── loras/
│ ├── controlnet/
│ └── upscale_models/
├── custom_nodes/ ← Custom node packs installed here
│ ├── ComfyUI-Manager/
│ ├── ComfyUI-Impact-Pack/
│ └── ...
├── input/ ← Drop input images here
├── output/ ← Generated images/videos saved here
├── user/
│ └── default/
│ └── workflows/ ← Saved workflows (.json)
└── web/ ← Frontend files
The most important custom node — manages everything else.
Install:
cd ComfyUI/custom_nodes
git clone https://github.com/ltdrdata/ComfyUI-ManagerFeatures:
- Install / update / remove custom nodes
- Download models directly
- Restore missing nodes from a workflow
- One-click update all nodes
- Disable/enable individual nodes
How to install a custom node:
- Open ComfyUI → Click Manager
- Click Install Custom Nodes
- Search for node name
- Click Install
- Restart ComfyUI
# Launch with these flags
python main.py --lowvram --bf16-unet- Use GGUF quantized models (
ComfyUI-GGUFnode pack) - FLUX.1-schnell-Q4 GGUF runs on 6GB VRAM
- Use SDXL instead of FLUX for low VRAM
- Enable tiled VAE for large resolutions
- Enable
--fastflag (2026 feature) - Use
torch.compilevia settings - Use
--bf16-uneton RTX 30/40 series - Reduce steps (FLUX: 20 steps is fine, SDXL: 25 steps)
- Use LCM/Lightning/Turbo LoRAs for 4–8 step generation
| Model | Min VRAM | Recommended |
|---|---|---|
| SD 1.5 | 4 GB | 6 GB |
| SDXL | 6 GB | 8 GB |
| SD 3.5 Medium | 6 GB | 10 GB |
| FLUX.1-schnell | 8 GB | 12 GB |
| FLUX.1-dev | 12 GB | 16 GB |
| FLUX.1-dev (GGUF Q4) | 6 GB | 8 GB |
| Wan 2.1 (480p) | 12 GB | 16 GB |
| Wan 2.6 (720p) | 16 GB | 24 GB |
| Error | Cause | Fix |
|---|---|---|
CUDA out of memory |
Not enough VRAM | Use --lowvram, use GGUF model, reduce resolution |
Missing node: xyz |
Custom node not installed | Open Manager → Install Missing Nodes |
model not found |
Model file in wrong folder | Check folder structure, ensure correct subfolder |
black/grey output image |
Wrong VAE or VAE mismatch | Download correct VAE, use dedicated VAE loader |
NaN values |
Model/settings mismatch | Use --bf16-unet, check sampler settings |
Connection refused 8188 |
ComfyUI not running | Restart ComfyUI, check terminal for errors |
Slow generation |
CPU fallback | Ensure CUDA installed, check python main.py output |
FLUX grey output |
Wrong CLIP loader | FLUX needs DualCLIPLoader with t5xxl + clip_l |
Module not found |
Missing Python package | Run pip install -r requirements.txt again |
ComfyUI has a built-in REST API at http://127.0.0.1:8188.
import json
import urllib.request
# Load your workflow JSON
with open("workflow.json", "r") as f:
workflow = json.load(f)
# Queue the prompt
data = json.dumps({"prompt": workflow}).encode("utf-8")
req = urllib.request.Request("http://127.0.0.1:8188/prompt", data=data)
urllib.request.urlopen(req)| Endpoint | Method | Purpose |
|---|---|---|
/prompt |
POST | Queue a workflow |
/queue |
GET | View current queue |
/history |
GET | View generation history |
/interrupt |
POST | Stop current generation |
/object_info |
GET | Get all available nodes |
pip install comfyui-clientfrom comfyui_client import ComfyUIClient
client = ComfyUIClient("http://127.0.0.1:8188")
result = client.run_workflow("my_workflow.json")ComfyUI V3 introduced a proper versioned node API (2026). Old V1 nodes still work but V3 is recommended for new nodes.
# my_custom_node.py
from comfy.comfy_types import IO, ComfyNodeABC
class MyCustomNode(ComfyNodeABC):
@classmethod
def define_schema(cls):
return {
"required": {
"image": (IO.IMAGE,),
"text": (IO.STRING, {"default": "hello"}),
},
"returns": [(IO.IMAGE, "output_image")],
"category": "My Nodes",
"display_name": "My Custom Node",
}
def execute(self, image, text):
# Your logic here
return (image,)
NODE_CLASS_MAPPINGS = {"MyCustomNode": MyCustomNode}
NODE_DISPLAY_NAME_MAPPINGS = {"MyCustomNode": "My Custom Node"}define_schemareplaces nested dict INPUT_TYPES- Stateless execution model
- Async support built-in
- Real backward compatibility guarantees
- Better error messages
Full V3 docs: https://docs.comfy.org/custom-nodes/walkthrough
| Resource | Link |
|---|---|
| ComfyUI GitHub | github.com/comfyanonymous/ComfyUI |
| Official Docs | docs.comfy.org |
| ComfyUI Desktop App | comfy.org |
| ComfyUI Manager | github.com/ltdrdata/ComfyUI-Manager |
| Site | Description |
|---|---|
| ComfyUI Workflows | Community workflow sharing |
| OpenArt | Workflows with previews |
| CivitAI | Models + workflows |
| Comfy Registry | Official custom node registry |
| Resource | Description |
|---|---|
| Scott Detweiler YouTube | Best ComfyUI tutorials |
| Latent Vision YouTube | Advanced ComfyUI |
| ComfyUI Wiki | Community wiki |
| Civitai Guides | Community how-tos |
| Thunder Compute Blog | Updated 2026 guides |
| Community | Platform | Link |
|---|---|---|
| ComfyUI Official | Discord | discord.gg/comfyui |
| r/comfyui | reddit.com/r/comfyui | |
| ComfyUI Community | GitHub Discussions | Discussions |
| CivitAI Community | Discord | discord.gg/civitai |
Found outdated info? Know a better workflow? Add a missing node?
Read CONTRIBUTING.md — contributions take 5 minutes!
- Found outdated info → Open an issue with
outdatedlabel - Want to add a workflow → Open a PR with the workflow JSON
- Found a broken link → Open an issue with
broken linklabel
If this helped you, please star the repo! It helps other ComfyUI users find it.