self-hosted/ai
§01·recipe · image

FLUX 3 Image Klein on RTX 4090: Distilled int8 Text-to-Image in ComfyUI

imageintermediate8GB+ VRAM
Oct 16, 2026

This intermediate recipe sets up FLUX 3 Image Klein on the RTX 4090, needing about 8 GB of VRAM.

models
tools
prerequisites
  • NVIDIA RTX 4090 (24 GB VRAM) and a driver recent enough for PyTorch cu130
  • Python 3.13 and git
  • A Hugging Face account that has accepted the license on black-forest-labs/flux-3-image-klein-comfy (the repo is gated)

What You'll Build

A local text-to-image setup for Black Forest Labs' FLUX 3 Image Klein on an RTX 4090, run in ComfyUI v0.41.2 with the distilled int8 transformer (flux3_image_klein_sd_int8_convrot.safetensors), the int8 Qwen3-VL-4B text encoder and the W4A8 prompt upsampler, all from the vendor's own ComfyUI repo. The three models together are 16.5 GiB of weights on disk, so on a 24 GB card they can all stay resident (derivation under Requirements).

Hardware data: RTX 4090 (24 GB VRAM) · 16.5 GiB of weights, derived, not a measured peak · no published seconds-per-image for this card · See benchmark data

⚠️ Name trap: the file without _sd_ is the Base checkpoint, not the distilled one. The vendor's card says: "Files with _sd_ in the name are the distilled checkpoint; the others are the base checkpoint." So flux3_image_klein_int8_convrot.safetensors is Base (50 steps, CFG 3.5), and the distilled file this recipe uses is flux3_image_klein_sd_int8_convrot.safetensors (16 steps, no guidance). Users in the repo's discussions have already mixed the two up, and one of the vendor's pull requests proposes renaming them the other way round (see Troubleshooting). Check the file table on the model card before you download.

⚠️ License: FLUX Kommunity License v1.0 — non-commercial use, plus commercial output generation for Qualifying Users under US$5M gross annualized revenue, per the ComfyUI repo card. The Qwen3-VL-4B text encoder and the prompt upsampler are Apache-2.0.

Requirements

ComponentMinimumThis recipe
GPU8 GB VRAM: the vendor says the int8 files run on 8 GB cards (quoted under Troubleshooting); the per-stage arithmetic below is consistent with that if ComfyUI loads the stages one after another, which is an assumption and was not measured. The vendor gives no number and no statement about the upsampler— not measured; budget below is derived (/contribute)
RAMnot stated by the vendor—
Storage17.75 GB of model files (table below), plus ComfyUI and PyTorch17,746,736,091 bytes measured from the HF tree API
SoftwareComfyUI v0.41.2, PyTorch cu130as installed in step 1

Weights budget (derived from file sizes, not measured on a card). The sizes are from the HF tree API for diffusion_models/ and text_encoders/; the VAE is 336,211,292 bytes per the HF tree API for vae/.

FileBytesGiB
flux3_image_klein_sd_int8_convrot.safetensors5,827,874,7795.428
qwen3vl_4b_int8_convrot.safetensors4,858,559,2404.525
qwen3.5_9b_flux3_prompt_upsampler_w4a8.safetensors6,724,090,7806.262
flux2-vae.safetensors336,211,2920.313
Total17,746,736,09116.528

Why min_vram_gb is 8, and what 24 GB buys. It is a filter floor, not a peak. It rests on the vendor's sentence that the int8 files run on 8 GB GPUs plus the per-stage sizes: sampling needs the transformer and VAE (5.741 GiB), text encoding needs the encoder (4.525 GiB), and prompt upsampling needs the W4A8 upsampler (6.262 GiB). Each stage is under 8 GB on its own. That the stages are not co-resident is an assumption, supported only by ComfyUI v0.41.2 having dynamic VRAM paging for NVIDIA cards; no run was measured and activation memory is unmeasured. On the RTX 4090 the all-resident sum of 16.528 GiB leaves 7.472 GiB of a 24 GiB card for activations, the CUDA context and the desktop, so all three models can stay loaded with headroom. That remainder is arithmetic, not a measured margin.

For the BF16 alternative, the distilled BF16 transformer (11,097,404,512 bytes) plus the BF16 text encoder (8,875,719,408), the W4A8 upsampler and the VAE sum to 25.177 GiB, which is over 24. The vendor's own reference code reports a peak on a B200 of 31 GB in BF16 with the upsampler off, and notes that "The prompt upsampler adds about 28 GB on an 80 GB GPU." That figure is for a different card and runtime and does not transfer to ComfyUI on a 4090, which is why this recipe documents the int8 files.

Installation

1. Install ComfyUI v0.41.2 with a cu130 PyTorch

FLUX 3 support was added by ComfyUI PR #17064, which is in v0.41.0. The vendor's discussion thread says the workflows were fixed in v0.41.2 (see Troubleshooting), so pin that tag. The ComfyUI README says: "Using a cu130 or above version of pytorch is required on Nvidia 20 series and above."

git clone --branch v0.41.2 https://github.com/Comfy-Org/ComfyUI.git
cd ComfyUI
python3 -m venv venv
source venv/bin/activate
pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu130
pip install -r requirements.txt

requirements.txt at v0.41.2 pins comfy-kitchen==0.2.37 (the library that provides the int8 and W4A8 kernels, no custom node needed) and comfyui-workflow-templates==0.11.86, which carries the FLUX 3 templates used below.

2. Log in to Hugging Face and accept the license

The repo is gated (gated: "auto" in the HF API), and an anonymous request for a file returns 401 with x-error-code: GatedRepo. Open black-forest-labs/flux-3-image-klein-comfy, accept the terms while signed in, then log in on the machine. Same terminal as step 1: inside the ComfyUI folder with the venv active.

pip install -U huggingface_hub
hf auth login

3. Download the four files

Same terminal, still inside the ComfyUI folder. This is the vendor's download command with two changes: --local-dir models instead of ComfyUI/models (because you are already inside ComfyUI), and the W4A8 upsampler in place of the int8 one, because the v0.41.2 distilled template loads the W4A8 file by name.

hf download black-forest-labs/flux-3-image-klein-comfy \
  diffusion_models/flux3_image_klein_sd_int8_convrot.safetensors \
  text_encoders/qwen3vl_4b_int8_convrot.safetensors \
  text_encoders/qwen3.5_9b_flux3_prompt_upsampler_w4a8.safetensors \
  vae/flux2-vae.safetensors \
  --local-dir models

The files land in models/diffusion_models/, models/text_encoders/ and models/vae/. The vendor's card lists the int8 upsampler (qwen3.5_9b_flux3_prompt_upsampler_int8_convrot.safetensors, 9,748,113,996 bytes) in its download example instead; with it the four files total 19.343 GiB, still under 24. The W4A8 file appears in the repo tree but not in the card's file table.

Running

Same terminal as before, inside the ComfyUI folder with the venv active:

python main.py

Open http://127.0.0.1:8188, then Workflow → Browse Templates → Image → FLUX 3 Image Klein Distilled: Text to Image. In the template file shipped in comfyui-workflow-templates-json 0.1.112 (the version comfyui-workflow-templates 0.11.86 requires), the text-to-image subgraph is preset as follows:

SettingValue in the v0.41.2 template
Transformerflux3_image_klein_sd_int8_convrot.safetensors
Text encoderqwen3vl_4b_int8_convrot.safetensors (loader type flux3)
Prompt upsamplerqwen3.5_9b_flux3_prompt_upsampler_w4a8.safetensors, switch on
VAEflux2-vae.safetensors
Size1024 × 1024
Samplereuler / simple, 16 steps, CFG 1

The vendor's defaults are "16 steps and no guidance for the distilled checkpoint, 50 steps and CFG 3.5 for the base checkpoint." Keep the upsampler switch on: the model card says "Do not use the model without a prompt upsampler." It takes your short request and writes the full scene caption the model expects; any LLM given the vendor's system_prompts.json can replace it.

Editing: the same template package has FLUX 3 Image Klein Distilled: Image Edit, which uses the same three models and euler, 16 steps, CFG 1, and takes reference images through a ReferenceMultiLatent node. The card says the editing templates have no upsampler branch and tells you to run your own LLM and paste the caption in. The v0.41.2 edit template does contain an upsampler branch (a TextGenerate node with the W4A8 loader and an image-editing system prompt) behind a switch that is off by default, so either route works. The note text inside that template still says 50 steps and CFG 3.5, which disagrees with its own sampler node; the sampler node is the one that runs.

Results

  • Speed: omitted. No seconds-per-image or it/s for any consumer card was found, so nothing is quoted for the RTX 4090 (search space in the sidecar: the three vendor repos' discussion tabs, the 79 ComfyUI issues opened since 2026-10-15, and two web searches; the model was three days old at the time of writing). The BFL B200 peak figures above are not a speed and not an RTX 4090 measurement. Report your own run via /contribute.
  • VRAM usage: 16.528 GiB of weights if everything is resident (table above). No peak was measured on this card. Activation memory at 1024 × 1024 is unmeasured here.
  • Quality notes: launch-week reactions in the vendor's discussion tab were mixed, and BFL staff there attribute poor output to a workflow error in the first ComfyUI release and to running without the prompt upsampler. Judge the model after following step 1 and keeping the upsampler on. No int8-versus-BF16 or W4A8-versus-int8 quality comparison was found.

For the full benchmark data, see /check/flux-3-image-klein/rtx-4090.

Troubleshooting

I downloaded flux3_image_klein_int8_convrot.safetensors and the output is soft or needs more steps

You have the Base checkpoint. Per the card, only names containing _sd_ are distilled. The unsuffixed and _base_ files in the repo have identical sizes (11,076,957,072 bytes for BF16, 5,807,427,339 for int8, 5,257,238,192 for NVFP4), and a user in discussion 18 reports the same hash. Base wants 50 steps and CFG 3.5. A BFL pull request, discussion 4, is marked "DO NOT MERGE YET" and proposes the opposite convention (unsuffixed names for distilled, _base_ for base) together with new workflows. A second change can break the distilled template from the other side: Comfy-Org/workflow_templates PR #1349, open when checked, adds prompt upsampling to the distilled templates and renames their model to flux3_image_klein_int8_convrot…, which today is the Base file. If it merges before the weights are renamed, the distilled template would load Base. If either lands, _sd_ names may disappear: re-read the file table on the model card before downloading and use whatever it then calls the distilled int8 file.

401 or GatedRepo when downloading

The comfy repo is gated. Accept the license on the repo page while signed in, then run hf auth login (step 2). The main repo black-forest-labs/flux-3-image-klein is gated the same way.

Anatomy is badly wrong, or the output looks generic

The vendor's discussion thread has BFL staff saying a workflow error in the first ComfyUI release was being fixed and that prompt upsampling should be used all the time, followed by a later post pointing users at ComfyUI v0.41.2 with updated workflows. Update to that tag, load the template again from Browse Templates (an old saved copy keeps the old graph), and make sure the upsampler switch is on.

The log says You need pytorch with cu130 or higher to use optimized CUDA operations

ComfyUI's comfy/quant_ops.py disables the comfy-kitchen CUDA backend when torch.version.cuda is below 13, which is what the int8 and W4A8 files rely on for their fast path. Reinstall PyTorch with the cu130 command in step 1. At startup the log also prints Found comfy_kitchen backend cuda: {...}; the backend is in use only if that dict says 'disabled': False.

flux3 is not an option in the CLIP loader, or the model fails to load

Your ComfyUI predates PR #17064. Check out v0.41.2 (step 1) and re-run pip install -r requirements.txt.

Can I run it with less than 24 GB, and does the whole template fit 8 GB?

The model card says: "The int8 files run on 8 GB GPUs such as the RTX 3070, and on GPUs without FP8 support (RTX 30 series and older)." ComfyUI's main.py at v0.41.2 contains dynamic VRAM support for NVIDIA cards (dynamic_vram_supported()), which pages weights on demand, but this recipe did not test it. Whether the whole template, upsampler included, fits an 8 GB card is not shown by any source found. If you test a smaller card, submit the result via /contribute.

The upsampler returns an empty prompt

One user, pwnyourace (not BFL staff), wrote in discussion 20: "if you are using the prompt upscaler in comfy don't set the model type to flux3 or the generate text node will output an empty prompt". The shipped distilled template (templates 0.11.86) sets exactly that type, flux3, on the upsampler loader, so the report and the template disagree, and the post names no type that works instead. Neither was tested for this recipe. If the upsampler branch returns an empty caption, turn its switch off and paste a full scene caption written by another LLM with the vendor's system_prompts.json as its system prompt.

share this recipe
Share
common questions
How much VRAM does FLUX 3 Image Klein need?

About 8 GB — the minimum this recipe targets.

Which GPUs is FLUX 3 Image Klein tested on?

RTX 4090 (24 GB).

How hard is this setup?

Intermediate — follow the steps above.

next