Image Generation3.5B

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

GIGABYTE GeForce RTX 5070 WINDFORCE OC 12G

gpu · Check Price on Amazon

Buy on AmazonAffiliate link — no extra cost to you

Step-by-Step Setup

  1. 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
  2. 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
  3. 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
  4. 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
  5. 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

ASUS Prime GeForce RTX 5070 SFF-Ready 12GB

gpu · Check Price on Amazon · 12 GB VRAM

Buy on AmazonAffiliate link — no extra cost to you

Related Guides