Running Flux and Other Image Models on Low VRAM
FLUX.1 dev needs about 35.4 GB with everything loaded in FP16, but only about 7.3 GB with GGUF Q4 weights and model swapping. That is how it runs on 8 GB cards. The three tricks are quantized weights, loading one model at a time, and tiled VAE decoding.
Best precision for each card
The highest-quality weight format that fits at 1024×1024 with model swapping (text encoder in FP8 except for the FP16 option).
| Model | 8 GB | 12 GB | 16 GB | 24 GB |
|---|---|---|---|---|
| Z-Image Turbo | FP8 | FP8 | FP16 / BF16 | FP16 / BF16 |
| SDXL 1.0 | FP16 / BF16 | FP16 / BF16 | FP16 / BF16 | FP16 / BF16 |
| FLUX.1 [dev] | GGUF Q4_K_S / NF4 | GGUF Q6_K | FP8 | FP8 |
| FLUX.1 Kontext [dev] | GGUF Q4_K_S / NF4 | GGUF Q6_K | FP8 | FP8 |
| Qwen-Image | Offload needed | Offload needed | GGUF Q5_K_S | FP8 |
| FLUX.2 [dev] | Offload needed | Offload needed | Offload needed | Offload needed |
Trick 1: quantized weights
FP8 halves the transformer; GGUF Q8_0 is close to FP16 quality at about the same size as FP8; Q5 and Q4 go further with small, visible changes in fine detail. In ComfyUI, load GGUF models with the ComfyUI-GGUF node; Forge supports GGUF and NF4 directly.
| FLUX.1 dev weights | Transformer | Peak with swapping |
|---|---|---|
| FP16 / BF16 | 22.2 GB | 23.2 GB |
| FP8 | 11.1 GB | 12.1 GB |
| GGUF Q8_0 | 11.8 GB | 12.8 GB |
| GGUF Q5_K_S | 7.6 GB | 8.6 GB |
| GGUF Q4_K_S / NF4 | 6.3 GB | 7.3 GB |
Trick 2: load one model at a time
An image pipeline has a text encoder, the diffusion transformer and a VAE. Keeping all of them loaded is fastest, but peak memory is their sum. Swapping loads each in turn, so the peak is only the largest stage. ComfyUI does this automatically on smaller cards; --lowvram forces it. The T5 text encoder in FP16 alone is about 9 GB, so run it in FP8 or GGUF on cards under 16 GB.
Trick 3: tiled VAE decoding
The final decode from latents to pixels needs about 3 GB per megapixel. Tiled decoding processes the image in pieces and cuts that to under 1 GB, which stops the out-of-memory error at the very end of a generation.
Which model for which card?
- 8 GB: Z-Image Turbo (fast, photorealistic, 6.8 GB in FP8) or FLUX.1 [dev] in GGUF Q4.
- 12 GB: FLUX.1 dev and Kontext in GGUF Q5–Q6; Qwen-Image only with Q4 weights plus a GGUF text encoder or partial offloading.
- 16 GB: FLUX.1 in FP8; Qwen-Image-Edit 2509 in Q4–Q5.
- 24–32 GB: FLUX.2 [dev] with GGUF weights and a quantized or offloaded text encoder; its 24B Mistral text encoder is the hard part.
Check any resolution and precision with the image model VRAM calculator, or browse by card: 8 GB, 12 GB, 16 GB.
A ComfyUI setup for 8–12 GB cards
- Install the ComfyUI-GGUF custom node (through ComfyUI Manager).
- Download a FLUX.1 dev GGUF file: Q4_K_S for 8 GB, Q5_K_S or Q6_K for 12 GB.
- Use the FP8 T5-XXL text encoder (about 4.6 GB) or a GGUF T5 for 8 GB cards.
- Replace the standard loader with "Unet Loader (GGUF)" and the text encoder loader with "DualCLIPLoader (GGUF)" if you use a GGUF encoder.
- Use the "VAE Decode (Tiled)" node.
- Start ComfyUI normally; it switches to low-VRAM mode on small cards. Add
--lowvramif you still see errors.
Resolution and memory
Activation memory grows with the number of pixels. For FLUX.1 dev in FP8:
| Resolution | Peak with swapping |
|---|---|
| 768×768 | 12.0 GB |
| 1024×1024 | 12.1 GB |
| 1536×1536 | 12.3 GB |
| 2048×2048 | 13.5 GB |
For large prints, generate at 1024×1024 and upscale with a tiled upscaler rather than generating at full size.
LoRAs and ControlNets
A FLUX LoRA adds a few hundred megabytes; several LoRAs add up. ControlNet models for FLUX are several gigabytes each and are loaded alongside the main model, so on 12 GB cards use GGUF Q4 for the base model when you add one.
Speed expectations
Low-VRAM tricks trade speed for memory. Model swapping adds a few seconds per image to reload the text encoder; GGUF dequantization costs a little on each step. On an RTX 3060 12GB, a 20-step FLUX.1 dev image at 1024×1024 typically takes one to two minutes. Z-Image Turbo needs only 8 steps and is much faster on the same card.