Image, video and audio
Image generation VRAM, explained: why Flux needs more than SDXL
A language model is one big pile of weights, and its memory bill is almost the file size plus a cache. An image model is a pipeline of separate networks, a few of which are far bigger than people expect, and the bill depends on how they are arranged as much as on how many parameters they have. That is why "will Flux run on my card" has four different honest answers.
Where the gigabytes go
Every modern image model has the same four jobs. A text encoder turns your prompt into vectors. A denoiser, either a UNet or a transformer, does the actual drawing over many steps. A VAE converts between pixels and the compressed latent space where the drawing happens. Newer models add a second or third text encoder. Here is Stable Diffusion XL, the model most home setups still start with:
| Part of Stable Diffusion XL | Parameters | BF16 | FP8 | 4-bit |
|---|---|---|---|---|
| unet | 2.57B | 4.78 GB | 2.39 GB | 1.44 GB |
| text encoder | 0.12B | 0.23 GB | 0.11 GB | 0.07 GB |
| text encoder 2 | 0.69B | 1.29 GB | 0.65 GB | 0.39 GB |
| vae | 0.08B | 0.16 GB | 0.16 GB | 0.16 GB |
| All parts | 3.469B | 6.46 GB | 3.31 GB | 2.06 GB |
And here is FLUX.1 dev, which is the benchmark everything else is compared with:
| Part of FLUX.1 dev | Parameters | BF16 | FP8 | 4-bit |
|---|---|---|---|---|
| transformer | 11.90B | 22.2 GB | 11.1 GB | 6.69 GB |
| text encoder | 0.12B | 0.23 GB | 0.11 GB | 0.07 GB |
| text encoder 2 | 4.76B | 8.87 GB | 4.43 GB | 2.68 GB |
| vae | 0.08B | 0.16 GB | 0.16 GB | 0.16 GB |
| All parts | 16.87B | 31.4 GB | 15.8 GB | 9.60 GB |
Look at the proportions rather than the totals. In Flux the T5 text encoder is almost 5B parameters by itself, more than a third of the size of the denoiser, and it is only used once at the start of each generation. The VAE is a rounding error in size and still decides whether a large image survives, which the next section explains. The structure of the pipeline is what makes offload work: parts that run one after another can take turns on the card.
Three things set whether it runs
Precision is the first. Stored at 16 bits, which is how most models are published, a 12B denoiser is over 22 GB. At 8 bits it is half that. At 4 bits, such as in the GGUF Q4 format, it is about a quarter, and detail softens a little. FP8 is native on recent NVIDIA cards, and GGUF files work on any card with the right tool. The quality cost of 8 bits is usually invisible, and of 4 bits is visible on fine texture.
Offload is the second. A pipeline does not need every part in memory at once. The text encoder runs first and can step aside, so the runtime can keep one component on the GPU at a time. Diffusers calls this model offload, and the cost is a few seconds per image. Moving the text encoder to the CPU entirely, or streaming the denoiser layer by layer from system RAM, goes further and slows the run a lot more. Our engine tries these in order, from fastest to slowest, and reports the first one that fits.
Resolution is the third, and it works differently from the first two because it affects working memory and time rather than weights. A 1024 pixel image becomes a latent grid 128 positions on a side when the VAE compresses by 8 times, and doubling the side quadruples the grid. Attention cost grows with the square of that. The decode at the end also needs memory in proportion to the pixels, and it is where many out-of-memory errors happen, after all the real work is done.
| Output | Sequence | Memory | Time | Fits? |
|---|---|---|---|---|
| 512 x 512 | 4,096 tokens | 8.0 GB | 3.5 s | yes |
| 1024 x 1024 | 16,384 tokens | 9.9 GB | 14 s | yes |
| 1536 x 1536 | 36,864 tokens | 13 GB | 32 s | yes |
| 2048 x 2048 | 65,536 tokens | 17 GB | 57 s | no |
What runs on which card
For each device we try the highest precision and the least offload that fits, and estimate the time for one image at the model's native size and step count. A cell reading "does not fit" would mean nothing works; most show a way to make it run and what it costs.
| Device | Memory | Stable Diffusion XL | FLUX.1 schnell | FLUX.1 dev |
|---|---|---|---|---|
| GeForce RTX 3050 6GB | 6 GB | 46 s GGUF Q8_0, encoder on CPU | 5 min 45 s BF16, sequential offload | 40 min 14 s BF16, sequential offload |
| GeForce RTX 4060 | 8 GB | 20 s GGUF Q8_0 | 2 min 38 s BF16, sequential offload | 18 min 28 s BF16, sequential offload |
| GeForce RTX 3060 12GB | 12 GB | 24 s BF16 | 33 s GGUF Q5_K_M, encoder on CPU | 3 min 52 s GGUF Q5_K_M, encoder on CPU |
| GeForce RTX 4060 Ti 16GB | 16 GB | 14 s BF16 | 19 s GGUF Q5_K_M | 2 min 8 s GGUF Q5_K_M |
| GeForce RTX 3090 | 24 GB | 8.9 s BF16 | 12 s GGUF Q8_0 | 1 min 20 s GGUF Q8_0 |
| GeForce RTX 4090 | 24 GB | 4.0 s BF16 | 5.1 s GGUF Q8_0 | 34 s GGUF Q8_0 |
The pattern matches what people report. SDXL is comfortable from 8 GB up, and quick on any recent card. Flux needs a quantized denoiser below 16 GB, and the distilled schnell variant gets you an image in a handful of steps where dev takes dozens. The smallest cards can run Flux, and slowly enough that you would start a job and leave. We have not measured diffusion times ourselves, so treat the seconds as estimates and the memory figures as the stronger claim.
Choosing a setup
Pick the model first, then the precision, and let offload be the last resort. If you have 8 GB, SDXL and its derivatives are the right family, and the low-VRAM guide shows how to fit Flux if you want to. With 12 GB, Flux at 8 bits with the text encoder offloaded is workable. At 24 GB you can run Flux at full quality with the encoder resident, and start looking at video, which the video guide takes up. When you are unsure, the image calculator lets you pick a model and a card and see the arrangement it would use.
Questions people ask
How much VRAM do I need for Stable Diffusion XL?
About 8 GB is comfortable and 6 GB works with offload. The denoiser is 2.6B parameters, so the weights come to roughly 7 GB at 16 bits, and the working memory for a 1024 pixel image comes on top.
Why does Flux need so much more memory than SDXL?
Its denoiser has 12B parameters and it pairs with a 4.8B T5 text encoder. At 16 bits that is over 31 GB of weights before any image is made, nearly 5 times SDXL.
Does a bigger image need more VRAM?
Yes, and faster than you would expect. Doubling both sides quadruples the number of latent tokens, and the decode step at the end can need more memory than the denoising did.
What is VAE tiling?
The VAE turns the finished latent into pixels and can use gigabytes in one go. Tiling decodes the image in pieces, trading a few seconds for most of that peak, and it is often what makes a high-resolution image fit.