Skip to main content

Image generation model

Self-hosting FLUX.2: 141GB for the 32B, 13GB for the 4B

From klein 4B under Apache 2.0 to full-precision dev 32B, the FLUX family spans more than a tenfold difference in VRAM. This page puts every variant's real footprint, quant tier, and matching GPU side by side.

FLUX is Black Forest Labs' line of image generation and editing models, and the current mainline is FLUX.2. It ships in four tiers: pro and flex are API-only, while dev and klein have open weights. The change that rewrites your VRAM budget is architectural — FLUX.1 used a T5-XXL plus CLIP-L pair of text encoders, and FLUX.2 replaces both with a single Mistral-3 24B vision-language model. Once the text encoder grows to 24 billion parameters, more than half the answer to "how much VRAM does FLUX need" no longer lives in the diffusion model at all.

FLUX.2 [dev] is a 32B flow-matching transformer. Fully resident in bf16 it wants 141GB or more; with CPU offload the peak drops to roughly 80GB; 4-bit quantisation with a 4-bit text encoder lands near 20GB; 4-bit with a remote text encoder lands near 18GB — the path Black Forest Labs explicitly points at an RTX 4090 or RTX 5090. klein is the size-distilled and step-distilled sibling: 4 steps by default at guidance 1.0, with the 4B at roughly 13GB under Apache 2.0 and the 9B at roughly 29GB including its Qwen3-8B encoder, non-commercial, with official fp8 weights also published.

The FLUX.1 line is far from retired. dev, Krea [dev], and Kontext [dev] are all 12B — around 24GB in bf16, about 12GB at fp8, and 6–8GB as a Q4 GGUF — with a mature ComfyUI ecosystem, a deep LoRA catalogue, and ready-made TensorRT BF16/FP8/FP4 weights. For batch product shots and bulk editing it is still the best value tier. What you actually need is to try klein 4B on an RTX 3090, 4-bit dev on an RTX 4090, and klein 9B at full precision on an A6000 in the same afternoon, and pay only for the hours that ran. NexGPU has 2,498 GPUs across 75 models and 1,175 verified rentable nodes, billed per second, with no minimum and no quota request.

01 —

FLUX variants: parameters and VRAM

The six open-weight workhorses, with footprints as published by the project and the community

VersionParametersVRAMContextNotes
FLUX.2 [dev]32B (text encoder: Mistral-3 24B)bf16 resident ~141GB / CPU offload peak ~80GB / fp8 ~32GB / 4-bit + remote encoder ~18GBUp to 4MP output, up to 10 reference images, 14MP total inputThe strongest open-weight tier available, with generation and multi-image editing in one checkpoint. Ships under the FLUX.2-dev Non-Commercial License; commercial use needs a separate BFL licence.
FLUX.2 [klein] 9B9B (text encoder: Qwen3-8B)bf16 ~29GB; official FLUX.2-klein-9b-fp8 weights also published4-step distilled, guidance 1.0, 1024×1024The quality-to-latency sweet spot, distilled to hold its own against models roughly five times its size. Non-commercial, with a klein-9b-base checkpoint available as an un-distilled fine-tuning base.
FLUX.2 [klein] 4B4B (text encoder: Qwen3-4B)bf16 ~13GB; transformer-only GGUF at Q8_0 4.3GB, Q4_K_M 2.6GB, Q2_K 1.83GB4-step distilled, guidance 1.0, sub-second end-to-end inferenceThe only Apache 2.0 checkpoint in the FLUX.2 family. Paired with the equally Apache 2.0 FLUX.2-VAE, this is the route you can ship commercially without a licence conversation.
FLUX.1 [dev]12B (T5-XXL + CLIP-L)bf16 ~24GB / fp8 ~12GB / GGUF Q4 ~6–8GB1024×1024, reference example runs 50 steps at guidance_scale 3.5Guidance-distilled, so true CFG stays at 1 and you steer the guidance embedding instead. The generation with the deepest LoRA and workflow ecosystem; non-commercial licence.
FLUX.1 Kontext [dev]12BSame class as FLUX.1 [dev]; official BF16 / FP8 / FP4 TensorRT weights publishedInstruction-driven image editing, compatible with FLUX.1 [dev] inference codeThe open-weight default for "change this person's shirt to red" style edits. Day-zero support in ComfyUI, Diffusers, and TensorRT.
FLUX.1 [schnell]12BFrom ~16GB in bf16; same fp8 and GGUF tiers as dev4-step generationApache 2.0. If you want to ship commercially on the FLUX.1 line without negotiating a licence, schnell is the only option.

02 —

Which GPU to rent for FLUX

Matched honestly to VRAM — we will not send a 32B bf16 job to a 24GB card

  • Style check: klein 4B GGUF, or FLUX.1 dev at fp8 or Q4, to see whether the look and prompt adherence hold up

    RTX 3090 24GB$0.193/GPU-hr

    The 13GB klein 4B and the 12GB fp8 FLUX.1 both sit entirely on-card, at the cheapest cost per gigabyte of VRAM we rent.

  • FLUX.2 dev at 4-bit with a remote or 4-bit text encoder, peaking around 18–20GB

    RTX 4090 24GB$0.540/GPU-hr

    This is the consumer path Black Forest Labs names for diffusers/FLUX.2-dev-bnb-4bit, and 24GB covers the peak with room left for 1024×1024 activations.

  • klein 9B at full bf16, feeding 10 reference images and rendering 4MP output

    RTX A6000 48GB$0.817/GPU-hr

    29GB of weights presses right against a 32GB card once references stack up; 48GB keeps the 4-step speed advantage from being eaten by offload.

  • FLUX.2 dev at fp8 for production batches, with the 32B backbone and Mistral-3 encoder both resident

    A100 SXM4 80GB$1.088/GPU-hr

    Roughly 32GB of fp8 weights plus the encoder still leaves most of the card for concurrent batches — cheaper in wall-clock time than quantising and dequantising on every run.

03 —

Four steps to a running FLUX

Both routes here — the official flux2 repo and Diffusers. Pick one and finish it.

  1. 01

    Launch an instance on a CUDA image

    Pick a GPU from the table above at console.nexgpu.net and boot straight into a prebuilt PyTorch or ComfyUI image. The official flux2 repo is validated on CUDA 12.9 with Python 3.12, so choosing the matching image out of our 2,000+ saves you half an hour of driver work. Once it is up, reach it over SSH, Jupyter, or the web terminal.

    ssh root@<your-instance> -p <port>
  2. 02

    Install the official inference repo

    black-forest-labs/flux2 is the reference implementation for FLUX.2, and klein 4B, klein 9B, and dev all enter through the same CLI. Use the cu129 wheel index — installing against the wrong CUDA build is the single most common first stumble.

    git clone https://github.com/black-forest-labs/flux2 && cd flux2 && python3.12 -m venv .venv && source .venv/bin/activate && pip install -e . --extra-index-url https://download.pytorch.org/whl/cu129
  3. 03

    Pull weights and prove the pipeline with klein 4B

    klein 4B is Apache 2.0, so there is no licence gate to click through, and 13GB of VRAM is enough to generate. The CLI's --name flag takes registry keys such as klein-4b, klein-9b, and dev; if you keep weights in a custom directory, point MODEL_PATH and AE_MODEL_PATH at it so a fresh instance does not re-download. klein defaults to 4 steps at guidance 1.0 — do not pile on steps out of FLUX.1 habit.

    hf download black-forest-labs/FLUX.2-klein-4B && PYTHONPATH=src python scripts/cli.py --name klein-4b
  4. 04

    Move up to dev 32B via 4-bit or CPU offload

    To run the 32B on a 24GB card, use the official 4-bit weights together with model-level offload; with enough VRAM, load bf16 directly. dev defaults to 50 steps at guidance 4.0, and 28 steps is the usual speed compromise. The VAE stays in bf16 even in the quantised build — leave it alone.

    python -c "import torch; from diffusers import Flux2Pipeline; pipe=Flux2Pipeline.from_pretrained('diffusers/FLUX.2-dev-bnb-4bit', torch_dtype=torch.bfloat16); pipe.enable_model_cpu_offload(); pipe('a studio product shot of a matte black espresso machine', num_inference_steps=28, guidance_scale=4.0).images[0].save('out.png')"

What one real batch actually costs

Say you need 300 product shots out of FLUX.2 dev at 4-bit on an RTX 4090 24GB at $0.540/GPU-hr. Half an hour to build the environment and pull weights: 0.5 × $0.540 = $0.27. Four hours of continuous generation: 4 × $0.540 = $2.16. Compute subtotal: $2.43. Leave the weights on disk overnight — 4-bit dev plus the klein 4B GGUF plus the encoder comes to roughly 60GB, and at $0.414/GB-month that is 60 × 0.414 ÷ 30 = $0.83 for the day. Three hundred 1024×1024 PNGs is about 1.5GB of egress, so 1.5 × $0.0081 ≈ $0.01. Round trip: about $3.27. The same batch on an RTX A6000 48GB running klein 9B in bf16 for 4.5 hours would be 4.5 × $0.817 = $3.68. And an H200 141GB holding dev 32B plus the Mistral-3 24B encoder fully resident in bf16 with no offload at all runs $6.660/GPU-hr — a single hour costs more than the entire run above. That is exactly why you size VRAM before you pick a card: compute billing stops the second the instance stops, while storage keeps billing until you destroy it.

04 —

Frequently asked questions

How much VRAM does FLUX.2 dev really need, and can a 24GB card run it?

There are four honest answers. Fully resident in bf16 it needs 141GB or more, which realistically means an H200-class card. With CPU offload, components take turns on the GPU and the peak lands near 80GB. At 4-bit with a 4-bit text encoder it is roughly 20GB, and at 4-bit with a remote text encoder roughly 18GB. So yes, 24GB works — but only on the quantised path, and those figures are for 1024×1024; push toward 4MP or stack reference images and activations climb further. On NexGPU those tiers map cleanly to RTX 4090 24GB at $0.540, A100 SXM4 80GB at $1.088, and H200 141GB at $6.660. Start on the 4090 with 4-bit, move up if the quality is not there, and never file a quota request in between.

Is FLUX.1 dev still worth running, and how does it differ from FLUX.2?

It is. FLUX.1 dev is 12B — about 24GB in bf16, 12GB at fp8, and 6–8GB as a Q4 GGUF — so a single RTX 3090 runs it at full speed. FLUX.2 dev is 32B with a Mistral-3 24B text encoder bolted on, which moves VRAM up an entire order of magnitude. What you buy with that is 4MP output, multi-image editing with up to 10 references, and markedly better text rendering. If your work is batch product photography, stylised illustration, or anything riding on an existing pile of FLUX.1 LoRAs, staying on FLUX.1 is the better economics; multi-image consistency and complex typography are what justify the jump. RTX 3090 24GB is $0.193/GPU-hr on NexGPU, so run both lines side by side on two instances and settle it for less than the price of a coffee.

Can I use FLUX output commercially, and how does licensing work?

It depends entirely on the checkpoint. FLUX.2 [klein] 4B is Apache 2.0 and so is FLUX.2-VAE, which makes that combination commercially usable as-is; FLUX.1 [schnell] is likewise Apache 2.0. FLUX.2 [dev], FLUX.2 [klein] 9B, and the whole FLUX.1 dev / Krea / Kontext / Fill / Depth / Canny / Redux set are non-commercial, and commercial use goes through Black Forest Labs' self-serve licensing portal for separate terms. The FLUX.2-dev licence additionally requires you to run NSFW and IP-infringement filters on both input and output. That is a legal question rather than a compute one, but it determines how big a card you need: if 4B is your only option, 13GB is plenty, and an RTX 3090 24GB on NexGPU has room to spare.

Does GGUF Q4 hurt quality, and which quant tier should I pick?

It does, but predictably: Q4 gives up fine texture and text rendering first, while composition and colour largely survive. In the klein 4B GGUF set, Q8_0 is 4.3GB, Q6_K is 3.41GB, Q4_K_M is 2.6GB, and Q2_K is 1.83GB — transformer only, excluding the encoder and VAE. Q4 is fine for drafts and composition triage; for finals use at least Q8, or go straight to fp8. One gotcha catches nearly everyone: in ComfyUI, GGUF requires the ComfyUI-GGUF custom node and its Unet Loader (GGUF), and your text encoder must be the matching GGUF build too — mixing in an fp16 encoder either errors out or produces garbage. Our prebuilt ComfyUI image ships that dependency chain ready to go, from $0.193/GPU-hr.

What GPU do I need to train a FLUX LoRA?

For FLUX.1 dev, tooling like ai-toolkit ships a ready 24GB configuration (train_lora_flux_24gb.yaml), so a single RTX 4090 24GB or RTX 3090 24GB gets you started — $0.540 and $0.193 respectively. For comfortable batch sizes and higher resolutions, RTX A6000 48GB at $0.817 or A100 PCIE 80GB at $0.824 make more sense, and note those two prices are nearly identical, so the extra 32GB is essentially free. For FLUX.2, with a 32B backbone and a 24B encoder, plan fine-tuning from 80GB upward, or build on the un-distilled klein-9b-base and klein-4b-base checkpoints instead. NexGPU nodes go up to 14 GPUs each with a maximum node VRAM of 2,152GB, so scaling out later does not mean changing providers.

It OOMs the moment I load on a 4090 — what usually went wrong?

In order of frequency. First, forgetting that FLUX.2's text encoder is Mistral-3 24B: you quantised the diffusion backbone but left the encoder in bf16, and the encoder alone eats the card — quantise it too, or push it off-box with the remote text encoder. Second, never calling enable_model_cpu_offload(), so every component stays resident. Third, a GGUF encoder that does not match the backbone build. Fourth, not enough system RAM: offload moves weights into host memory, and the guidance is 32GB of RAM minimum with 64GB recommended once you offload — watching only VRAM will still get you killed. Fifth, undersized disk; FLUX.2 dev plus encoder plus VAE is 60GB before you add anything. Every one of these is avoidable at instance-selection time on NexGPU — pick a node with the RAM and disk to match, run it, stop it, and pay by the second rather than for the time you spent debugging.

Start building on NexGPU

Enterprise R&D team or solo developer — either way, your first job can be running in minutes.

Sign up to browse live network pricing. No payment method required.