Table of Contents
Stable Diffusion VRAM Requirements Overview
Image generation models vary dramatically in VRAM needs, from SD 1.5 fitting comfortably in 4 GB to Flux.1 needing 20+ GB at full precision. This guide covers every major version of Stable Diffusion and its successors to help you choose the right dedicated GPU server for Stable Diffusion hosting.
Unlike LLMs, image generation models have VRAM requirements that vary significantly during the pipeline. The UNet/transformer is the biggest consumer during denoising, while the VAE decode is a separate peak. Models using sequential offloading can reduce peak VRAM by loading components one at a time.
Complete VRAM Table (All Models)
Peak VRAM During Generation (1024×1024 for SDXL/Flux, 512×512 for SD 1.5/2.1)
| Model | Parameters | FP32 | FP16 | FP8 | NF4 |
|---|---|---|---|---|---|
| SD 1.5 | 860M | ~6 GB | ~3.5 GB | ~2.5 GB | ~2 GB |
| SD 2.1 | 865M | ~6.5 GB | ~3.8 GB | ~2.8 GB | ~2.2 GB |
| SDXL Base | 3.5B | ~16 GB | ~6.5 GB | ~4.5 GB | ~3.5 GB |
| SDXL Base + Refiner | 6.6B | ~28 GB | ~7.5 GB* | ~5 GB* | ~4 GB* |
| SD 3 Medium | 2B | ~10 GB | ~5.5 GB | ~4 GB | ~3 GB |
| Flux.1 Dev | 12B | ~48 GB | ~20 GB | ~12 GB | ~8 GB |
| Flux.1 Schnell | 12B | ~48 GB | ~20 GB | ~12 GB | ~8 GB |
*SDXL Base + Refiner uses sequential loading (one model at a time), so peak VRAM is roughly the same as Base alone. For Flux.1 analysis on specific GPUs, see our RTX 3090 Flux.1 and RTX 4060 SDXL articles.
Which GPU Do You Need?
| GPU | VRAM | SD 1.5 | SDXL | Flux.1 Dev | Best For |
|---|---|---|---|---|---|
| RTX 3050 | 8 GB | Excellent | Works (tight) | NF4 only | SD 1.5 production |
| RTX 4060 | 8 GB | Excellent | Good | NF4 only | SDXL personal use |
| RTX 4060 Ti | 16 GB | Excellent | Excellent | FP8 | SDXL production |
| RTX 3090 | 24 GB | Excellent | Excellent | FP16 | Flux.1 production |
For a broader GPU comparison, see our best GPU for Stable Diffusion guide.
Resolution Impact on VRAM
Higher resolutions dramatically increase VRAM during the denoising process:
| Resolution | SD 1.5 (FP16) | SDXL (FP16) | Flux.1 Dev (FP16) |
|---|---|---|---|
| 512×512 | ~3.5 GB | ~4.5 GB | ~14 GB |
| 768×768 | ~4.5 GB | ~5.5 GB | ~17 GB |
| 1024×1024 | ~6 GB | ~6.5 GB | ~20 GB |
| 1536×1536 | ~10 GB | ~12 GB | ~32 GB |
| 2048×2048 | ~16 GB | ~20 GB | ~50 GB |
VRAM scales roughly quadratically with resolution (doubling resolution quadruples pixel count). For high-resolution output, use tiled upscaling rather than generating at full resolution to avoid OOM errors.
Batch Size Impact on VRAM
Generating multiple images simultaneously increases VRAM:
| Model (FP16, native res) | Batch 1 | Batch 2 | Batch 4 | Batch 8 |
|---|---|---|---|---|
| SD 1.5 (512×512) | ~3.5 GB | ~4.5 GB | ~6.5 GB | ~10 GB |
| SDXL (1024×1024) | ~6.5 GB | ~9.5 GB | ~15 GB | ~26 GB |
| Flux.1 (1024×1024) | ~20 GB | ~28 GB | ~44 GB | ~76 GB |
SD 1.5 offers the best batch efficiency. On a 24 GB GPU, you can generate 8 SD 1.5 images simultaneously but only 1-2 Flux.1 images. For high-throughput production, SD 1.5 or SDXL may be more practical than Flux.1.
Practical Deployment Recommendations
- SD 1.5 (personal/small team): RTX 3050 or RTX 4060. Comfortable at 512×512, fast generation. Ideal for custom models and LoRAs.
- SDXL (production): RTX 4060 Ti (16 GB) for comfortable 1024×1024 generation with ControlNet and batching.
- Flux.1 (best quality): RTX 3090 (24 GB) for FP16 Flux.1 Dev at 1024×1024. Use FP8 for higher resolutions.
- High throughput: Multiple GPUs or multi-GPU clusters. Parallelize across GPUs rather than batching on one.
For cost comparisons, see our cheapest GPU for AI inference guide. Also check our image generator hosting and deploy SD server pages.
Quick Setup Commands
ComfyUI (All Models)
git clone https://github.com/comfyanonymous/ComfyUI
cd ComfyUI && pip install -r requirements.txt
python main.py --force-fp16
Automatic1111 (SD 1.5 + SDXL)
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui
cd stable-diffusion-webui
./webui.sh --xformers
Diffusers Python API
pip install diffusers transformers torch
# Flux.1 Schnell example
python3 -c "
from diffusers import FluxPipeline
import torch
pipe = FluxPipeline.from_pretrained('black-forest-labs/FLUX.1-schnell', torch_dtype=torch.float16).to('cuda')
pipe('A sunset over mountains', num_inference_steps=4).images[0].save('out.png')
"
For full deployment guides, see our deploy Stable Diffusion server tutorial. Compare GPU options on our GPU comparison tool and the RTX 3090 vs 5090 comparison.
Deploy This Model Now
Dedicated GPU servers with the VRAM you need. UK datacenter, full root access.
Browse GPU Servers