self-hosted/ai
§01·recipe · image

Flux.1 Dev on RTX 4090: ComfyUI Image Generation Guide

imagebeginner16GB+ VRAMMay 13, 2026
models
tools
prerequisites
  • NVIDIA RTX 4090 (24GB VRAM) or similar 16GB+ GPU
  • ComfyUI installed (latest version)
  • Python 3.10+

What You'll Build

Generate high-quality images locally on your RTX 4090 using Flux.1 Dev — one of the best open-weight image generation models available. No cloud services, no API costs.

Benchmark: 2.1 it/s · Peak VRAM: 10.5GB (FP16) · See all data

Requirements

ComponentMinimumTested
GPURTX 4070 (12GB)RTX 4090 (24GB)
VRAM16GB24GB
RAM16GB32GB
Storage35GB35GB

Installation

1. Install ComfyUI

git clone https://github.com/comfyanonymous/ComfyUI
cd ComfyUI
pip install -r requirements.txt

2. Download Flux.1 Dev Model Files

Flux.1 Dev requires accepting the license on HuggingFace first:

# Install huggingface-cli if you haven't
pip install huggingface_hub

# Login with your HF token
huggingface-cli login

# Download the model
huggingface-cli download black-forest-labs/FLUX.1-dev \
  --local-dir ./models/

Place files in ComfyUI directories:

  • flux1-dev.safetensorsComfyUI/models/unet/
  • ae.safetensors (VAE) → ComfyUI/models/vae/
  • clip_l.safetensorsComfyUI/models/clip/
  • t5xxl_fp16.safetensorsComfyUI/models/clip/

3. Install ComfyUI Manager (Recommended)

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

This lets you install workflow dependencies with one click.

Running

Start ComfyUI:

python main.py --listen

Navigate to http://localhost:8188 in your browser.

Quick start: Download the official Flux.1 Dev workflow and drag it into ComfyUI.

Recommended Settings

For RTX 4090 with 24GB VRAM:

  • Precision: FP16 (best quality)
  • Steps: 20–30 (good balance of speed/quality)
  • CFG Scale: 1.0 (Flux doesn't use CFG like older models)
  • Resolution: 1024×1024 standard, up to 2048×2048 possible

Performance

ConfigSpeedVRAM
FP16, 20 steps, 1024×10242.1 it/s10.5GB
FP16, 20 steps, 2048×2048~1.2 it/s~18GB

Source: community benchmarks. View all RTX 4090 data →

Quantization Options

If VRAM is limited or you want faster generation:

FormatVRAMSpeedQuality
FP1610.5GBBaselineBest
Q8_0 GGUF~8GBSimilarExcellent
Q4_K_M GGUF~5GBFasterGood

For GGUF variants, install ComfyUI-GGUF and download the appropriate weights.

Troubleshooting

Out of Memory: Enable --lowvram flag: python main.py --listen --lowvram

Slow generation: Ensure GPU is selected: Check torch.cuda.is_available() returns True in Python

Blank/gray output: T5 text encoder must be loaded. Check that both clip files are in models/clip/

License error: Accept the license at huggingface.co/black-forest-labs/FLUX.1-dev first