FLUX.1 is a 12-billion-parameter image model. In BF16 it needs about 34 GB of VRAM with its text encoders, so run it on a 48 GB card, or on a 24 GB RTX 4090 with FP8 weights or CPU offload. Use ComfyUI or diffusers. [schnell] is Apache 2.0; [dev] is non-commercial.
- FLUX.1 transformer size
- 12B parameters (published)
- Full BF16 footprint (arithmetic)
- ≈34 GB with T5-XXL, CLIP-L and VAE
- FP8 transformer
- ≈12 GB; fits a 24 GB card with an FP8 T5
- [schnell] settings
- 4 steps, guidance 0, Apache 2.0
- [dev] settings
- 28–50 steps, guidance ≈3.5, non-commercial licence
- RTX 4090 for FLUX
- 24 GB at $1.59/hr
- L40S for FLUX in BF16
- 48 GB at $1.89/hr
FLUX.1 is the open-weight image model most people reach for when they want the best quality they can run themselves. It is also big: a 12-billion-parameter transformer plus a large T5 text encoder, which puts it beyond the 8–12 GB cards that ran Stable Diffusion comfortably. This guide shows how to run it on a GPU you own or one you rent, with exact settings for both the fast [schnell] and the higher-quality [dev] variants, and what it costs per image.
It is part of our series on running Stable Diffusion and FLUX on a cloud GPU, which covers the shared setup in more detail.
What is FLUX.1?
FLUX.1 is a family of text-to-image models from Black Forest Labs, a company founded by researchers behind the original Stable Diffusion. It uses a rectified-flow transformer of about 12 billion parameters, a T5-XXL and a CLIP-L text encoder, and a 16-channel VAE.
| Variant | Open weights? | Licence | Typical steps | Guidance | Use it for |
|---|---|---|---|---|---|
| FLUX.1 [schnell] | Yes | Apache 2.0 | 1–4 | 0 (not used) | Fast drafts, commercial products, high volume |
| FLUX.1 [dev] | Yes (gated) | FLUX.1 [dev] Non-Commercial License | 20–50 | ≈3.5 | Best open quality, research, personal work |
| FLUX.1 [pro] | No (API only) | Commercial via BFL and partners | n/a | n/a | When you want hosted quality and no GPU |
Black Forest Labs has also published task-specific open models built on FLUX.1, such as the Fill, Canny, Depth and Redux tools and FLUX.1 Kontext [dev] for image editing. They share the same infrastructure needs as [dev] and carry the same non-commercial terms. Check the Black Forest Labs Hugging Face page for the current list and licences.
Should you run FLUX locally or in the cloud?
Run FLUX locally if you already own a 24 GB card and use it most days. Rent a cloud GPU if you do not own one, need more than 24 GB, or generate in bursts. The deciding numbers are utilisation and VRAM.
| Situation | Better choice | Why |
|---|---|---|
| You own an RTX 3090 or 4090 and generate daily | Local | Hardware is already paid for; power is the only running cost |
| You have an 8–12 GB card | Cloud, or local with 4-bit GGUF | 4-bit works but is slow and slightly lower quality |
| You want [dev] in full BF16 with LoRAs and ControlNets | Cloud 48 GB+ | ~34 GB of weights before extras |
| You need 10,000 images by Friday | Cloud, several GPUs | Spread the job across cards, then stop paying |
| You are building a product API | Cloud | Uptime and a stable host; your laptop is not a server |
The instructions below are written for a rented Linux GPU, but every command works on your own Linux machine with an NVIDIA card and the CUDA build of PyTorch. On Windows, ComfyUI's portable build is the easiest local route.
How much VRAM does FLUX need?
At BF16, FLUX.1 needs about 34 GB for all its weights, using the rule weights ≈ parameters × bytes per parameter. Precision is the lever that brings it down.
| Component | Parameters (approx.) | BF16 (2 bytes) | FP8 (1 byte) | 4-bit (~0.55 bytes) |
|---|---|---|---|---|
| Transformer | 12B | 24 GB | 12 GB | ~6.6 GB |
| T5-XXL encoder | 4.7B | 9.5 GB | 4.9 GB | ~2.6 GB |
| CLIP-L encoder | 0.12B | 0.25 GB | 0.25 GB | 0.25 GB |
| VAE | 0.08B | 0.17 GB | 0.17 GB | 0.17 GB |
| Total weights | ≈34 GB | ≈17 GB | ≈9.6 GB |
Add 10–20% headroom for activations, the CUDA context and the framework. So, as a rule of thumb: BF16 wants 40 GB+ (an L40S or larger), FP8 fits a 24 GB RTX 4090, and 4-bit runs on 12–16 GB cards. The text encoder only runs once per prompt, so offloading it to CPU RAM costs little speed. The full per-model breakdown is in how much VRAM Stable Diffusion and FLUX need, and the trade-offs of FP8 and 4-bit are explained in quantisation explained.
Step 1: Launch a GPU and prepare the machine
Pick an RTX 4090 for FP8, or an L40S or bigger for BF16, and choose the Root way in. On Wandering Giants Compute that gives you SSH into Ubuntu with the NVIDIA driver, CUDA and PyTorch installed.
ssh -p PORT USER@HOST # command from your dashboard
nvidia-smi # confirm GPU and VRAM
df -h ~ # FLUX files need ~35 GB free (more for both variants)
sudo apt-get update && sudo apt-get install -y git python3-venv tmux
python3 -m venv ~/flux --system-site-packages # reuse the installed PyTorch
source ~/flux/bin/activate
pip install -U pip "huggingface_hub[cli]" hf_transfer
export HF_HUB_ENABLE_HF_TRANSFER=1Step 2: Get a Hugging Face token and download the weights
FLUX.1 [dev] is gated. Sign in at huggingface.co, open the [FLUX.1 [dev] model page](https://huggingface.co/black-forest-labs/FLUX.1-dev), accept the licence, then create a read token under Settings, Access Tokens.
huggingface-cli login # paste the token; or: export HF_TOKEN=hf_xxxFor ComfyUI you want single files placed in specific folders. These are the files ComfyUI's own FLUX examples use:
git clone https://github.com/comfyanonymous/ComfyUI ~/ComfyUI
cd ~/ComfyUI && pip install -r requirements.txt
# Diffusion model (the 12B transformer)
huggingface-cli download black-forest-labs/FLUX.1-dev flux1-dev.safetensors \
--local-dir models/diffusion_models
huggingface-cli download black-forest-labs/FLUX.1-schnell flux1-schnell.safetensors \
--local-dir models/diffusion_models
# VAE
huggingface-cli download black-forest-labs/FLUX.1-schnell ae.safetensors \
--local-dir models/vae
# Text encoders: pick t5xxl_fp16 on 48 GB+, t5xxl_fp8_e4m3fn on 24 GB
huggingface-cli download comfyanonymous/flux_text_encoders \
clip_l.safetensors t5xxl_fp8_e4m3fn.safetensors \
--local-dir models/text_encodersStep 3: Run FLUX in ComfyUI over an SSH tunnel
Start ComfyUI bound to localhost inside tmux so it survives a dropped connection:
tmux new -s comfy
cd ~/ComfyUI && python main.py --listen 127.0.0.1 --port 8188
# Ctrl-b d to detachOn your own computer, open a tunnel and browse to http://localhost:8188:
ssh -N -L 8188:127.0.0.1:8188 -p PORT USER@HOSTBuild the standard FLUX graph: Load Diffusion Model (flux1-dev.safetensors, weight dtype fp8_e4m3fn on a 24 GB card), DualCLIPLoader (type flux, with clip_l and the T5 file), Load VAE (ae.safetensors), a CLIP Text Encode node feeding FluxGuidance set to 3.5, an Empty SD3 Latent Image at 1024×1024, and a KSampler with sampler euler, scheduler simple, 20–28 steps and CFG 1.0. For [schnell], use 4 steps and skip FluxGuidance. ComfyUI's example images embed the workflow, so you can also drag one from the ComfyUI docs onto the canvas.
Why --listen 127.0.0.1? Plain --listen binds ComfyUI to every interface, and ComfyUI has no authentication. The tunnel gives you the same access with nothing exposed. More detail, including ComfyUI-Manager and headless API use, is in how to run ComfyUI on a cloud GPU.
Step 4: Run FLUX with diffusers in Python
diffusers is the better route for scripts, batch jobs and APIs. Install it with the text-encoder dependencies:
pip install -U diffusers transformers accelerate safetensors sentencepiece protobufFLUX.1 [schnell]: four steps, Apache 2.0
import torch
from diffusers import FluxPipeline
pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-schnell",
torch_dtype=torch.bfloat16)
pipe.to("cuda") # 48 GB+; on 24 GB use pipe.enable_model_cpu_offload()
image = pipe(
"a ceramic teapot shaped like a sleeping fox, studio product photo",
guidance_scale=0.0, num_inference_steps=4, max_sequence_length=256,
height=1024, width=1024,
generator=torch.Generator("cpu").manual_seed(0),
).images[0]
image.save("schnell.png")FLUX.1 [dev]: full quality on 48 GB or more
import torch
from diffusers import FluxPipeline
pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-dev",
torch_dtype=torch.bfloat16).to("cuda")
image = pipe(
"an isometric cutaway of a tiny bakery, warm morning light",
guidance_scale=3.5, num_inference_steps=28, max_sequence_length=512,
height=1024, width=1024,
generator=torch.Generator("cpu").manual_seed(0),
).images[0]
image.save("dev.png")The model card's reference uses 50 steps; 28 is a common trade-off with little visible loss. Try both on your prompts.
FLUX.1 [dev] on a 24 GB or smaller card with 4-bit weights
diffusers can load the transformer in 4-bit NF4 with bitsandbytes, which brings it to roughly 6–7 GB:
pip install -U bitsandbytesimport torch
from diffusers import FluxPipeline, FluxTransformer2DModel
from diffusers import BitsAndBytesConfig
quant = BitsAndBytesConfig(load_in_4bit=True, bnb_4bit_quant_type="nf4",
bnb_4bit_compute_dtype=torch.bfloat16)
transformer = FluxTransformer2DModel.from_pretrained(
"black-forest-labs/FLUX.1-dev", subfolder="transformer",
quantization_config=quant, torch_dtype=torch.bfloat16)
pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-dev",
transformer=transformer,
torch_dtype=torch.bfloat16)
pipe.enable_model_cpu_offload() # T5 runs on GPU only while encoding
image = pipe("a paper boat on a puddle reflecting city lights",
guidance_scale=3.5, num_inference_steps=28).images[0]
image.save("dev-nf4.png")Adding a LoRA
FLUX LoRAs load the same way as for SDXL:
pipe.load_lora_weights("path/or/hf-repo", weight_name="my_flux_lora.safetensors")
image = pipe("photo of TOK person hiking", guidance_scale=3.5, num_inference_steps=28).images[0]These examples assume a recent diffusers release (0.33 or newer) and PyTorch 2.x. The diffusers FLUX documentation tracks API changes.
How fast is FLUX, and what does 1,000 images cost?
FLUX is slower than SDXL: roughly four times the work per step, and [dev] uses more steps. These are our rough estimates for one 1024×1024 image, from published community figures scaled by each card's compute and bandwidth, not our own measurements.
Cost per 1,000 images = seconds per image × 1,000 ÷ 3,600 × hourly price.
| Variant and settings | GPU | Seconds per image (est.) | GPU-hours per 1,000 | Our cost per 1,000 images |
|---|---|---|---|---|
| [schnell], 4 steps | RTX 4090 | 3 | 0.83 | 0.83 × $1.59/hr ≈ $1.32 |
| [schnell], 4 steps | H100 PCIe | 1.5 | 0.42 | 0.42 × $4.99/hr ≈ $2.10 |
| [dev], 28 steps, FP8 | RTX 4090 | 18 | 5.00 | 5.00 × $1.59/hr ≈ $7.95 |
| [dev], 28 steps, BF16 | L40S | 20 | 5.56 | 5.56 × $1.89/hr ≈ $10.51 |
| [dev], 28 steps, BF16 | H100 PCIe | 9 | 2.50 | 2.50 × $4.99/hr ≈ $12.48 |
| [dev], 28 steps, BF16 | RTX PRO 6000 | 9 | 2.50 | 2.50 × $4.89/hr ≈ $12.22 |
| [dev], 28 steps, NF4 + offload | RTX 4090 | 25 | 6.94 | 6.94 × $1.59/hr ≈ $11.03 |
At other providers' published prices (checked 25 Nov 2026), [dev] on a RunPod Secure Cloud RTX 4090 at $0.89/hr is 5 × 0.89 = $4.45 per 1,000 images, and on a RunPod H100 PCIe at $2.89/hr is 2.5 × 2.89 = $7.23. The 4090 is the cheaper card per image here even though the H100 is twice as fast; that pattern usually holds for single-image FLUX work. Our 10,000-image cost breakdown runs the same maths at larger volume.
How do you make FLUX faster?
Four changes give most of the gains, in roughly this order of effort.
- Use [schnell] where quality allows. 4 steps against 28 is the biggest single saving.
- Use FP8 on cards that support it. Ada (RTX 4090, L40S), Hopper (H100) and Blackwell (RTX PRO 6000) have FP8 tensor cores; the A100 does not, so FP8 there saves memory but not time.
- Keep everything on the GPU. Offload saves VRAM at the cost of PCIe transfers each image. If the card has room, use
pipe.to("cuda"). - Compile the transformer.
pipe.transformer = torch.compile(pipe.transformer, mode="max-autotune")adds a few minutes of warm-up and usually speeds up later images. It only pays back on long batches.
Fewer steps, smaller images (896×1152 rather than 1024×1024 saves little; 768×768 saves a lot) and batching several prompts per call do the rest.
What about the licence?
Treat this as a hard requirement, not a footnote. FLUX.1 [schnell] is Apache 2.0: you can run it in a commercial product. FLUX.1 [dev] and the FLUX.1 tools are under the FLUX.1 [dev] Non-Commercial License: fine for research, personal and evaluation use, but running it to serve a paying product needs a commercial licence from Black Forest Labs. The licence text on the [FLUX.1 [schnell] model card](https://huggingface.co/black-forest-labs/FLUX.1-schnell) and the [dev] card is the authority; read it, and ask a lawyer if money depends on it.
Running on a rented GPU does not change the licence position. It does change who sees your prompts: on a machine you rent whole, they stay on that machine.
When does renting from Wandering Giants Compute fit?
Renting from us fits when you want FLUX on a 24 GB RTX 4090 or a 48 GB L40S (or 96 GB on an RTX PRO 6000) without building the machine: Ubuntu, CUDA and PyTorch are already installed, you get root over SSH, and you are billed by the minute from prepaid credit. If credit runs out the machine stops and its disk is kept for 7 days, and a paused machine pays only for its disk, about 3¢ an hour per 50 GB, so your 35 GB of FLUX weights wait for you between sessions.
If you want the lowest hourly rate, marketplaces list 4090s for less than we charge; if you want a hosted FLUX API with no machine at all, Black Forest Labs and several inference providers sell one. For a comparison of providers specifically for this model, see the best GPU clouds for FLUX. When you are ready, choose a GPU and launch with Root access.
Frequently asked questions
Can I run FLUX.1 on 24 GB of VRAM?
Yes. Load the transformer in FP8 (about 12 GB) with an FP8 T5 text encoder, or use diffusers' enable_model_cpu_offload() so only the active component sits on the GPU. An RTX 4090 runs FLUX.1 [dev] this way at roughly 15–20 seconds per 1024×1024 image at 28 steps (estimate).
Can I run FLUX on 12 or 16 GB?
With 4-bit quantisation, yes. NF4 via bitsandbytes in diffusers, or GGUF-quantised FLUX files in ComfyUI with the ComfyUI-GGUF custom node, bring the transformer to roughly 6–7 GB. Quality drops slightly and speed suffers on smaller cards.
What is the difference between FLUX.1 [dev] and [schnell]?
[schnell] is distilled to produce an image in 1–4 steps and is licensed Apache 2.0. [dev] is guidance-distilled for higher quality at 20–50 steps and is released under a non-commercial licence. Both are 12B models and use the same text encoders and VAE.
Is FLUX.1 [dev] free for commercial use?
No. The [dev] weights are under the FLUX.1 [dev] Non-Commercial License. If you want to use [dev] in a commercial product you need a licence from Black Forest Labs; read the model card for the current terms. [schnell] is Apache 2.0 and can be used commercially.
Do I need a Hugging Face token for FLUX?
For FLUX.1 [dev], yes: accept the licence on its Hugging Face page and authenticate with an access token. Using a token for every download is the simplest habit, since it also avoids anonymous rate limits.
Is it cheaper to run FLUX locally or in the cloud?
If you already own a 24 GB card and generate every day, local is cheaper. If you generate in bursts, renting by the minute usually wins: at an estimated 18 seconds per [dev] image on a 4090, 1,000 images is about 5 GPU-hours.
Rent the GPU for this, by the minute.
Run FLUX.1 on a 24 GB RTX 4090 or a 48 GB L40S with root access and CUDA ready, billed by the minute and stopped automatically when your credit runs out.
Prepaid credit, billed by the minute, stops itself when credit runs out. Prices in £, $, €, ¥, CA$, A$, CHF and S$; UK prices include VAT.
Keep reading
- Complete guideHow to Run Stable Diffusion on a Cloud GPU
- ComparisonBest GPU Clouds for FLUX Image Generation
- GuideHow Much VRAM Do You Need for Stable Diffusion and FLUX?
- TutorialHow to Run ComfyUI on a Cloud GPU
- GuideQuantization Explained: Running Large AI Models on Smaller GPUs
- Cost breakdownHow Much Does It Cost to Generate 10,000 AI Images?
About this article. Written by the Wandering Giants Compute team, the people who run Wandering Giants Compute. Hardware figures are the manufacturers’ published specifications. Speeds and costs marked as estimates are worked out from those specifications and our current prices, with the method shown; they are not measured benchmarks. Wandering Giants prices are taken live from our price list each time this page is built.
Last reviewed 25 November 2026.