ComfyUI Workflows Cheat Sheet

ComfyUI workflows cheat sheet for Stable Diffusion. Learn node setups, custom workflows, LoRA integration, ControlNet, and advanced automation for AI image generation. Updated December 2025.

Last Updated: December 24, 2025

Essential Node Types

Node Purpose Category
CheckpointLoaderSimple Load base model (SD 1.5, SDXL, etc.) Loaders
CLIPTextEncode Process text prompts (positive/negative) Conditioning
KSampler Generate images from noise Sampling
VAEDecode Convert latent to pixel space Latent
SaveImage Save output images Image
LoadImage Load reference images Image
LoraLoader Add LoRA modifications Loaders
ControlNetLoader Load ControlNet models Loaders

Basic Text-to-Image Workflow

1. CheckpointLoaderSimple
   ├─→ MODEL → KSampler
   ├─→ CLIP → CLIPTextEncode (Positive) → KSampler
   ├─→ CLIP → CLIPTextEncode (Negative) → KSampler
   └─→ VAE → VAEDecode

2. KSampler
   └─→ LATENT → VAEDecode

3. VAEDecode
   └─→ IMAGE → SaveImage

# Connections Flow:
Checkpoint → CLIP → Text Encode → Sampler → VAE Decode → Save

KSampler Parameters

Parameter Range Description
seed 0 - 2^32 Random seed for reproducibility
steps 1 - 150 Sampling steps (20-30 typical)
cfg 1.0 - 30.0 Classifier-free guidance (7-11 typical)
sampler_name Various Euler, DPM++, etc.
scheduler Various Normal, Karras, Exponential
denoise 0.0 - 1.0 Denoising strength (1.0 = full)

Popular Samplers

Euler a
Fast, good for quick iterations (ancestral)
DPM++ 2M Karras
High quality, balanced speed
DPM++ SDE Karras
Very high quality, slower
UniPC
Fast convergence, fewer steps needed
DDIM
Deterministic, good for img2img

Image-to-Image Workflow

1. LoadImage
   └─→ IMAGE → VAEEncode

2. VAEEncode
   └─→ LATENT → KSampler

3. KSampler (set denoise 0.4-0.8)
   └─→ LATENT → VAEDecode

4. VAEDecode
   └─→ IMAGE → SaveImage

# Key: Lower denoise = closer to original
# 0.3-0.5: Small changes
# 0.6-0.8: Moderate changes
# 0.9-1.0: Major changes

LoRA Integration

1. CheckpointLoaderSimple
   ├─→ MODEL → LoraLoader
   └─→ CLIP → LoraLoader

2. LoraLoader
   ├─→ MODEL → KSampler
   ├─→ CLIP → CLIPTextEncode
   # strength_model: 0.5-1.0 (typical 0.7-0.9)
   # strength_clip: 0.5-1.0 (typically same as model)

# Multiple LoRAs: Chain LoraLoaders
LoraLoader1 → LoraLoader2 → LoraLoader3 → KSampler

ControlNet Workflow

1. LoadImage (reference)
   └─→ IMAGE → ControlNetPreprocessor

2. ControlNetPreprocessor (Canny, Depth, etc.)
   └─→ IMAGE → ControlNetApply

3. ControlNetLoader
   └─→ CONTROL_NET → ControlNetApply

4. ControlNetApply
   ├─→ CONDITIONING (to KSampler positive)
   # strength: 0.5-1.5 (control influence)

# Common Preprocessors:
- CannyEdgePreprocessor: Edge detection
- DepthEstimation: Depth maps
- OpenPosePreprocessor: Pose detection
- LineArtPreprocessor: Line art conversion

Upscaling Workflow

# Method 1: Latent Upscale
1. KSampler → LATENT → LatentUpscale
2. LatentUpscale → LATENT → KSampler (high-res pass)
3. KSampler → VAEDecode → SaveImage
   # upscale_method: nearest-exact, bilinear, area
   # denoise: 0.4-0.6 for refinement

# Method 2: Ultimate SD Upscale
1. Generate base image
2. UpscaleModelLoader (RealESRGAN, etc.)
3. ImageUpscaleWithModel
4. VAEEncode → KSampler (denoise 0.3-0.5)
5. VAEDecode → SaveImage

Batch Processing

# Batch Seeds
1. Add "Seed" node set to randomize/increment
2. Set batch_size in Empty Latent Image
3. SaveImage will output multiple files

# Batch Images
1. LoadImage → batch_size parameter
2. Process through workflow
3. Multiple outputs automatically saved

# Prompt Batch
1. Use "String" nodes with different prompts
2. "Primitive" node for switching
3. Queue multiple times with different values

Custom Node Essentials

ComfyUI-Manager
Install and manage custom nodes easily
WAS Node Suite
Image processing and utilities
Efficiency Nodes
Streamlined workflow nodes
Impact Pack
Advanced sampling and detailing
ControlNet Preprocessors
All ControlNet preprocessors

Keyboard Shortcuts

Shortcut Action
Ctrl + Enter Queue prompt
Ctrl + Shift + Enter Queue prompt (front of queue)
Space Add node menu
Ctrl + C / V Copy/paste nodes
Ctrl + M Mute/unmute node
Ctrl + B Bypass node
Delete Delete selected nodes
Ctrl + G Group selected nodes

Workflow Optimization

Use lower steps for testing (15-20)
Faster iterations during development
Cache models in memory
Enable in settings for faster switching
Use Efficiency Nodes
Combine multiple nodes into one
Bypass unused nodes
Ctrl+B to skip processing
Save workflows as .json
Right-click → Save Workflow

Troubleshooting Common Issues

Issue Solution
Out of memory Lower resolution, reduce batch size, use --lowvram flag
Nodes not connecting Check data type compatibility (MODEL, CLIP, LATENT, etc.)
Blurry output Check VAE settings, try different VAE models
Slow generation Use faster samplers, reduce steps, check GPU usage
Missing models Place in correct folders: models/checkpoints, models/loras, etc.

Model Folder Structure

ComfyUI/
├── models/
│   ├── checkpoints/       # .safetensors base models
│   ├── loras/             # LoRA files
│   ├── vae/               # VAE models
│   ├── controlnet/        # ControlNet models
│   ├── upscale_models/    # Upscalers (ESRGAN, etc.)
│   ├── clip/              # CLIP models
│   └── embeddings/        # Textual inversions
├── custom_nodes/          # Custom node extensions
└── output/                # Generated images

Advanced: API Usage

import json
import requests

# Load workflow JSON
with open('workflow.json') as f:
    workflow = json.load(f)

# Modify prompt
workflow['6']['inputs']['text'] = "your new prompt here"

# Queue prompt
response = requests.post(
    'http://127.0.0.1:8188/prompt',
    json={'prompt': workflow}
)

# Get result
prompt_id = response.json()['prompt_id']
# Poll for completion and download images
💡 Pro Tip: Start with the default workflow and modify it incrementally. Save variations with descriptive names like "txt2img_basic.json", "controlnet_canny.json". Use the Manager extension to easily install custom nodes and keep everything updated.
← Back to Data Science & ML | Browse all categories | View all cheat sheets