Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

ComfyUI Guide — A to Z (2026)

The most complete, up-to-date ComfyUI guide for 2026. From installation to advanced workflows — no outdated info.

Contributors PRs Welcome License: MIT Last Updated

Version info: Covers ComfyUI v0.19+, ComfyUI Manager v0.3.76+, Frontend v1.44+


Table of Contents


What is ComfyUI?

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/


System Requirements

Minimum

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+

Recommended

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

Best for ComfyUI (2026)

  • 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

No GPU?

See Cloud section below.


Installation

Windows

Option 1 — Official Portable Package (Easiest)

  1. Go to https://github.com/comfyanonymous/ComfyUI/releases
  2. Download ComfyUI_windows_portable_nvidia.7z (NVIDIA) or ComfyUI_windows_portable_amd.7z (AMD)
  3. Extract with 7-Zip
  4. Run run_nvidia_gpu.bat or run_cpu.bat
  5. Open browser at http://127.0.0.1:8188

Option 2 — Manual Install (Python)

# 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

Option 3 — ComfyUI Desktop App (New in 2026)

  • Official desktop app available at https://www.comfy.org/
  • One-click install, auto-updates, built-in model manager
  • Recommended for beginners

macOS

# 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.py

Apple Silicon (M1/M2/M3/M4) is supported via MPS backend. Performance is good for SDXL, slower for FLUX.


Linux

# 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.0

Cloud (No GPU)

Run 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

First Launch

  1. Open browser at http://127.0.0.1:8188
  2. You'll see a default workflow with basic nodes
  3. Click Queue Prompt to run your first generation
  4. 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+)

Understanding the Interface

┌─────────────────────────────────────────────────┐
│  Menu Bar  │  Queue  │  Settings  │  Manager    │
├─────────────────────────────────────────────────┤
│                                                 │
│              Node Canvas (Main Area)            │
│   [Node] ──► [Node] ──► [Node] ──► [Node]      │
│                                                 │
├─────────────────────────────────────────────────┤
│  Queue Status  │  Progress Bar                 │
└─────────────────────────────────────────────────┘

Key interactions:

  • Right-click canvas → Add node
  • Double-click canvas → Search nodes
  • Ctrl+Z → Undo
  • Ctrl+S → Save workflow
  • Ctrl+O → Load workflow
  • H → Fit view to screen
  • Ctrl+A → Select all nodes
  • Middle mouse drag → Pan canvas
  • Scroll wheel → Zoom

Core Concepts

Nodes

Every operation in ComfyUI is a node. Nodes have:

  • Inputs (left side, colored dots)
  • Outputs (right side, colored dots)
  • Widgets (settings inside the node)

Connections

Connect nodes by dragging from an output dot to an input dot. Colors must match (yellow = latent, purple = conditioning, green = image, etc.)

Workflow

A complete connected graph of nodes that produces an output. Saved as .json files.

Key Node Types

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

Latent Space

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.


Supported Models (2026)

Image Models

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

Video Models

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

Where to Download Models


Essential Custom Nodes

Install all via ComfyUI Manager (search by name).

Must-Have Nodes

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

FLUX-Specific Nodes

Node Pack Purpose
x-flux-comfyui FLUX ControlNet and tools
ComfyUI-FluxTrainer Fine-tune FLUX locally
JLC Flux2 ControlNet FLUX.2 ControlNet support (2026)

Video-Specific Nodes

Node Pack Purpose
ComfyUI-WanVideoWrapper Wan 2.1/2.6 video workflows
ComfyUI-CogVideoX-wrapper CogVideoX video generation
ComfyUI-Frame-Interpolation RIFE frame interpolation

Workflows

Text to Image

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 FluxGuidance node instead of CFG — set to 3.5

Image to Image

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

Inpainting & Outpainting

Required nodes:

Load Image ──► Load Image (mask) ──► VAE Encode (Inpaint) ──► KSampler

Or use the InpaintModelConditioning node for better results with inpainting-specific models.


Text to Video

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 --lowvram flag if running out of memory

Image to Video

Load Image ──► WanVideoImageEncode ──► WanVideoSampler ──► VHS_VideoCombine

ControlNet Workflows

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 Workflows

FLUX ControlNet (2026):

  • Use x-flux-comfyui or JLC Flux2 ControlNet nodes
  • 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


Upscaling Workflows

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 photos
  • 4x_NMKD-Siax_200k — Best for anime
  • RealESRGAN_x4plus — General purpose

Model Download Guide

Where to Place Models

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

Downloading via ComfyUI Manager

  1. Open ComfyUI → Manager → Model Manager
  2. Search for model name
  3. Click Download
  4. Model auto-placed in correct folder

Downloading from HuggingFace CLI

pip install huggingface_hub
huggingface-cli download black-forest-labs/FLUX.1-dev flux1-dev.safetensors --local-dir ./models/unet/

Folder Structure

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

ComfyUI Manager

The most important custom node — manages everything else.

Install:

cd ComfyUI/custom_nodes
git clone https://github.com/ltdrdata/ComfyUI-Manager

Features:

  • 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:

  1. Open ComfyUI → Click Manager
  2. Click Install Custom Nodes
  3. Search for node name
  4. Click Install
  5. Restart ComfyUI

Performance & VRAM Tips

Low VRAM (4–8 GB)

# Launch with these flags
python main.py --lowvram --bf16-unet
  • Use GGUF quantized models (ComfyUI-GGUF node pack)
  • FLUX.1-schnell-Q4 GGUF runs on 6GB VRAM
  • Use SDXL instead of FLUX for low VRAM
  • Enable tiled VAE for large resolutions

Speed Tips

  • Enable --fast flag (2026 feature)
  • Use torch.compile via settings
  • Use --bf16-unet on RTX 30/40 series
  • Reduce steps (FLUX: 20 steps is fine, SDXL: 25 steps)
  • Use LCM/Lightning/Turbo LoRAs for 4–8 step generation

VRAM Requirements Quick Reference

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

Common Errors & Fixes

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

API & Automation

ComfyUI has a built-in REST API at http://127.0.0.1:8188.

Basic API Usage (Python)

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)

Useful API Endpoints

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

ComfyUI Python Client

pip install comfyui-client
from comfyui_client import ComfyUIClient
client = ComfyUIClient("http://127.0.0.1:8188")
result = client.run_workflow("my_workflow.json")

Building Custom Nodes (V3)

ComfyUI V3 introduced a proper versioned node API (2026). Old V1 nodes still work but V3 is recommended for new nodes.

Basic V3 Node Structure

# 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"}

V3 Key Features

  • define_schema replaces 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


Useful Resources

Official

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

Workflow Sharing

Site Description
ComfyUI Workflows Community workflow sharing
OpenArt Workflows with previews
CivitAI Models + workflows
Comfy Registry Official custom node registry

Tutorials

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

Communities

Community Platform Link
ComfyUI Official Discord discord.gg/comfyui
r/comfyui Reddit reddit.com/r/comfyui
ComfyUI Community GitHub Discussions Discussions
CivitAI Community Discord discord.gg/civitai

Contributing

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 outdated label
  • Want to add a workflow → Open a PR with the workflow JSON
  • Found a broken link → Open an issue with broken link label

License

MIT © Pawan Pawar


If this helped you, please star the repo! It helps other ComfyUI users find it.

About

A to Z ComfyUI guide for 2026 - Install, nodes, models, workflows, custom nodes and tips

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors