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
| Component | Minimum | Tested |
|---|---|---|
| GPU | RTX 4070 (12GB) | RTX 4090 (24GB) |
| VRAM | 16GB | 24GB |
| RAM | 16GB | 32GB |
| Storage | 35GB | 35GB |
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.safetensors→ComfyUI/models/unet/ae.safetensors(VAE) →ComfyUI/models/vae/clip_l.safetensors→ComfyUI/models/clip/t5xxl_fp16.safetensors→ComfyUI/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
| Config | Speed | VRAM |
|---|---|---|
| FP16, 20 steps, 1024×1024 | 2.1 it/s | 10.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:
| Format | VRAM | Speed | Quality |
|---|---|---|---|
| FP16 | 10.5GB | Baseline | Best |
| Q8_0 GGUF | ~8GB | Similar | Excellent |
| Q4_K_M GGUF | ~5GB | Faster | Good |
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