How to Install and Use ComfyUI for AI Image Generation (Beginner Guide)
Step-by-step guide to install ComfyUI on Windows and Mac. Run AI image generation workflows locally with Stable Diffusion, FLUX, and more. Includes beginner-friendly setup and real-world examples.

ComfyUI is intimidating at first.
You open it, see a blank canvas with no buttons, and think: "What do I click?"
But once you figure it out, ComfyUI becomes the fastest way to generate AI images locally. No rate limits. No pay-per-image. Full control.
If you've been using ChatGPT or online Midjourney, ComfyUI feels like graduating from training wheels to a sports car.
This guide walks you through the entire setup — Windows and Mac — plus 3 real workflows you can use tonight.
What Is ComfyUI? (And Why Use It)
ComfyUI is a node-based interface for running AI image generation locally.
Instead of clicking "Generate" in a text box, you drag nodes together to build workflows. Each node = one step (load model, add prompt, sample image, save output).
Sounds complicated. But it's actually more flexible and visual than web interfaces.
Why ComfyUI > Online Tools
| Feature | ComfyUI | Midjourney | Stable Diffusion Web UI |
|---|---|---|---|
| Cost | Free (hardware only) | $10–96/month | Free |
| Model choice | 100+ models | 1 model | 10+ models |
| Speed | 5–30 sec (local GPU) | 60 sec (cloud) | Variable |
| Workflow save | Yes (reuse anytime) | No | Limited |
| Custom training | Yes | No | Limited |
| Private (no server logs) | Yes | No | Yes |
Best for: Iterating fast on image workflows, batch generation, custom models, privacy.
System Requirements (Before You Start)
Windows
- GPU: NVIDIA only (RTX 3060 or better, 8GB+ VRAM minimum)
- RTX 4090? 16GB VRAM → exceptional. Run 2–3 images in parallel.
- RTX 3060? 12GB VRAM → 1 image at a time, 10–15 sec per image.
- RTX 2070? 8GB VRAM → possible, but slower (30+ seconds per image).
- RAM: 16GB minimum (32GB recommended if running other apps)
- Disk: 100GB free (for models)
- OS: Windows 10 or later
Mac
- GPU: Any Mac with Apple Silicon (M1, M2, M3, M4) or Intel Mac with dedicated GPU
- RAM: 16GB minimum (32GB recommended)
- Disk: 100GB free
- OS: macOS 12 or later
Check Your VRAM
Windows (NVIDIA):
nvidia-smi
Look for "NVIDIA RTX" in the output. Note the VRAM line (e.g., "12GB").
Mac: System Settings → About → Memory. Example: "24GB unified memory".
Don't have enough VRAM? Use CPU mode (slow, but works). We'll cover this later.
Step 1: Install ComfyUI (5 minutes)
Windows + NVIDIA GPU
Option A: Automated Installer (Easiest)
- Go to ComfyUI GitHub Releases
- Download
ComfyUI_windows_portable_nvidia.zip(latest version) - Unzip to any folder (e.g.,
C:\ComfyUI) - Double-click
run_nvidia_gpu.bat - Wait 2–3 minutes for first launch (model download in background)
- Open browser →
http://localhost:8188
Option B: Manual Setup (More Control)
- Install Python 3.10 (from python.org) — add to PATH during install
- Open Command Prompt (Windows key + R, type
cmd) - Navigate to your ComfyUI folder:
cd C:\ComfyUI - Run setup:
python -m venv venv venv\Scripts\activate pip install -r requirements.txt pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 - Start ComfyUI:
python main.py - Browser →
http://localhost:8188
Mac + Apple Silicon
Automated Installer (Recommended)
- Go to ComfyUI GitHub Releases
- Download
ComfyUI_macos_arm64.zip(for M1/M2/M3/M4) - Unzip to any folder (e.g.,
~/ComfyUI) - Open Terminal, navigate to folder:
cd ~/ComfyUI - Run:
(First time: installs dependencies, ~5 min)chmod +x run_mac_cpu.sh ./run_mac_cpu.sh - Browser →
http://localhost:8188
Manual Setup:
- Install Homebrew (if not already):
brew install homebrew - Install Python 3.10:
brew install python@3.10 - Follow Windows manual setup (same commands)
Step 2: Load Your First Model (3 minutes)
Once ComfyUI loads, you'll see:
- Left panel: Nodes list (input, output, sampler, etc.)
- Center canvas: Blank workflow
- Right panel: Output images
Load Stable Diffusion (Default Model)
- Right-click on canvas → "Add Node" → "loaders" → "Load Checkpoint"
- A node appears. Click the dropdown showing "none"
- Select "sd15_model.safetensors" (or any
.safetensorsfile) - If no models appear: Models are downloading. Wait 5 minutes, refresh.
Not seeing any models?
- Download manually: Hugging Face model list
- Save to
ComfyUI/models/checkpoints/ - Restart ComfyUI, refresh browser
Step 3: Build Your First Workflow (10 minutes)
Here's the simplest workflow to generate an image:
The 5-Node Setup
- Load Checkpoint (already added)
- Right-click → "Add Node" → "conditioning" → "CLIPTextEncode (Prompt)"
- Add two of these (one for positive prompt, one for negative)
- Right-click → "Add Node" → "sampling" → "KSampler"
- Right-click → "Add Node" → "latent" → "VAE Decode"
- Right-click → "Add Node" → "image" → "Save Image"
Connect Nodes (Wire Them Together)
- Drag from Load Checkpoint
CLIPoutput → both CLIPTextEncodeclipinput - Drag from Load Checkpoint
MODELoutput → KSamplermodelinput - Drag from both CLIPTextEncode outputs → KSampler
positiveandnegative - Drag from Load Checkpoint
VAEoutput → KSamplerlatent_image...
Wait, this is getting complex. Here's a shortcut:
Faster: Use a Template
ComfyUI comes with starter workflows. Download one:
- Go to ComfyUI Examples
- Download
basic_workflow.json - Open ComfyUI → Load (bottom left) → select
basic_workflow.json - Done. You're ready to generate.
Step 4: Generate Your First Image (2 minutes)
- Find the CLIPTextEncode nodes (they have text input boxes)
- Positive prompt box: Type a description
- Example:
"A serene mountain landscape at sunset, professional photography, high detail"
- Example:
- Negative prompt box: Type what you DON'T want
- Example:
"blurry, low quality, text, watermark"
- Example:
- Click "Queue Prompt" (bottom right) or press Shift+Enter
- Wait 10–30 seconds (depending on GPU)
- Image appears in the right panel
Popular Workflows (Copy-Paste Ready)
Workflow 1: Simple Text-to-Image
- Load any Stable Diffusion model
- Add positive + negative CLIPTextEncode
- Connect to KSampler
- Sample → VAE Decode → Save
Workflow 2: Upscaling (Make Images Bigger)
- Text-to-image workflow (above)
- Add latent → "Upscale Latent" node
- Add upscale → "Upscale Model Loader" + "ImageUpscaleWithModel"
- Upscale after VAE Decode
Workflow 3: LoRA + Base Model (Custom Styles)
- Load checkpoint (base model)
- Add loaders → "Load LoRA"
- Connect between Load Checkpoint and KSampler
- Use LoRA for consistent art style (anime, oil painting, etc.)
Workflow 4: Batch Generation (10 Images at Once)
- Build basic workflow
- Find KSampler node → Change
seedto a range- Example:
1-10generates 10 variations
- Example:
- Click "Queue Prompt"
- ComfyUI queues all 10 and renders them
Model Downloads (Where to Get Them)
ComfyUI uses .safetensors files (models). Where to find them:
Official Sources (Recommended)
- Hugging Face — 10,000+ free models
- CivitAI — 50,000+ community models (anime, realistic, etc.)
- OpenModelDB — Organized by use case
Popular Models for Beginners
- Stable Diffusion 1.5 — Fast, versatile
- Stable Diffusion XL (SDXL) — Better quality, needs 12GB+ VRAM
- FLUX.1 — Newest (May 2024), best quality but slowest
- Dreamshaper (CivitAI) — Great for photorealistic images
- Realistic Vision (CivitAI) — Photorealistic people
Installation:
- Download
.safetensorsfile - Save to
ComfyUI/models/checkpoints/ - Restart ComfyUI or refresh browser
- Model appears in dropdowns
Troubleshooting
"CUDA Out of Memory"
- You ran out of VRAM
- Fix: Reduce image size (512×512 instead of 1024×1024)
- Or lower step count (15 instead of 20)
- Or use CPU mode (much slower)
"Model not found" (after download)
- Model file is corrupted or incomplete
- Fix: Delete the file, re-download, verify file size matches source
"ComfyUI won't start"
- Python version mismatch
- Fix: Reinstall Python 3.10 exactly, not 3.11 or 3.12
"GPU not detected"
- NVIDIA driver is outdated or CUDA not installed
- Fix: Update GPU driver from NVIDIA website
- Or use CPU mode:
python main.py --cpu
Real Examples (What Can You Make?)
-
Blog article hero images (1-click batch generation)
- Prompt:
"Minimalist tech blog header, [topic], professional design, 2026" - Batch: 10 variations, pick the best
- Time: 2 minutes for 10 images
- Prompt:
-
Product mockups (for indie products)
- Prompt:
"MacBook Pro 16 displaying [your product], wooden desk, coffee cup, natural lighting" - Batch: 5 variations
- Result: Professional-looking promo images, free
- Prompt:
-
YouTube thumbnails (consistency + speed)
- Save workflow → Reuse for each video
- Change only the text prompt
- Generate 3 variations per video thumbnail
-
Social media content calendar (bulk generation)
- Build 1 workflow, generate 30 images in one batch
- Theme:
"Motivational quote about [topic], minimalist design, social media post"
Next Steps: Advanced (After Week 1)
Once you're comfortable with the basics:
- Custom models — Train your own LoRA (personal style, face, brand)
- Node extensions — Add community nodes for extra features
- API mode — Automate image generation from Python scripts
- Video generation — Extend ComfyUI for Stable Video or frame-by-frame animation
Related Guides
- How to Use Stable Diffusion Locally (Complete Setup) — Easier alternative to ComfyUI
- Terminal Guide for AI Beginners — Command-line setup
- GPU VRAM Setup Guide — Check your hardware
FAQ
Q: Is ComfyUI free?
A: Yes. The software is free. You only pay for your hardware (GPU). No cloud costs.
Q: Can I use ComfyUI on CPU only (no GPU)?
A: Yes, but it's 50–100× slower. Images take 5–15 minutes instead of 10 seconds. Not recommended for regular use.
Q: What if I have an AMD GPU (not NVIDIA)?
A: ComfyUI supports AMD via HIP. Installation is slightly different — follow AMD HIP instructions on GitHub.
Q: Can I use ComfyUI on Mac without GPU?
A: Mac M1/M2/M3 has unified memory, so yes, it works well even without a dedicated GPU. Macs are actually great for ComfyUI.
Q: How do I save my workflows?
A: Click Save (bottom left) → name it → it saves as .json. Load it anytime with Load.
Q: Can I make videos with ComfyUI?
A: Yes (with extensions). Search "Stable Video Diffusion" or "AnimateDiff" for frame-to-video workflows.
Q: Where can I find good prompts?
A: Prompt library on CivitAI. Copy-paste prompts other users shared.
Q: How do I get LoRAs (custom styles)?
A: Download from CivitAI, save to models/loras/, load in workflow.
You're ready. Open ComfyUI, load a model, and generate your first image. Welcome to local AI image generation.

Alex the Engineer
•Founder & AI ArchitectSenior software engineer turned AI Agency owner. I build massive, scalable AI workflows and share the exact blueprints, financial models, and code I use to generate automated revenue in 2026.
Related Articles

Google's AI Brain Drain: Nobel Scientist John Jumper Joins Anthropic (What It Means for Claude)
Nobel Prize winner John Jumper just left Google DeepMind for Anthropic — days after Gemini's co-lead left for OpenAI. Here's why the world's best AI scientists are abandoning Google, and what it means for the AI tools you use.

What is MCP (Model Context Protocol)? A Beginner's Guide for 2026
MCP (Model Context Protocol) explained for beginners — what it is, how it works, why every AI tool is adding it, and how to use it without writing code.

How AI Is Making Cyberattacks More Sophisticated in 2026 (And How to Stay Safe)
AI tools are enabling a new generation of cyberattacks — faster, cheaper, and harder to detect. Here's what's actually happening and five practical steps to protect yourself in 2026.