Run SDXL and FLUX on RTX 5070
How to run SDXL and FLUX.1 on the NVIDIA RTX 5070 with 12 GB GDDR7 — setup, benchmarks, and VRAM optimization tips.
Generation Time
3–5s per 1024×1024 (SDXL)
Min Memory
8 GB
Software
Python 3.11, CUDA 12.4, ComfyUI
Hardware Used in This Guide
gpu · Check Price on Amazon
Step-by-Step Setup
- 01
Install CUDA 12.4 and drivers
RTX 5070 requires driver ≥ 565 and CUDA 12.4. Use the NVIDIA installer — do not install via apt directly on Windows.
# Verify on Linux nvidia-smi nvcc --version
- 02
Install ComfyUI
ComfyUI is the recommended front-end for SDXL and FLUX — better memory management than A1111 for high-res generation.
git clone https://github.com/comfyanonymous/ComfyUI cd ComfyUI pip install -r requirements.txt
- 03
Download SDXL checkpoint
The fp16 base model is ~6.5 GB — well within the RTX 5070's 12 GB VRAM.
cd models/checkpoints wget https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/resolve/main/sd_xl_base_1.0_0.9vae.safetensors
- 04
Launch ComfyUI
Start the server and open the browser UI. The RTX 5070 will appear in GPU selection automatically.
python main.py --gpu-only
- 05
Run FLUX.1 Dev for maximum quality
The RTX 5070's 12 GB VRAM fits FLUX.1 Dev in fp8 quantization. Expect ~6–8s for 1024×1024.
# ~8 GB fp8 checkpoint huggingface-cli download black-forest-labs/FLUX.1-dev \ --local-dir models/checkpoints/flux-dev
Optimization Tips
- ›
Enable --bf16-unet in ComfyUI if you see NaN artifacts — RTX 5000 series prefers bf16 over fp16 for FLUX.
- ›
12 GB VRAM fits SDXL + refiner in a single pass with --medvram; use --highvram for batched generation.
- ›
FLUX.1 Dev produces noticeably better text rendering than SDXL — worth the 2× extra generation time.
- ›
PyTorch 2.6+ includes Blackwell-optimized CUDA kernels — always use the latest nightly for RTX 50-series.
Other Hardware for SDXL / FLUX.1
gpu · Check Price on Amazon · 12 GB VRAM
Related Guides
Run Llama 3.1 70B on RTX 5070→
How to run Llama 3.1 70B (Q4) on an RTX 5070 12 GB using Ollama — includes VRAM limits, layer offload settings, and expected speed.
Run Stable Diffusion on Mac Mini M4→
How to run SDXL and FLUX on the Mac Mini M4 using Diffusers or ComfyUI — with expected generation times and optimization tips.