Comfy-Org Makes Black Forest Labs' FLUX.2 Klein Run in 1.2 Seconds Locally
Comfy-Org repackaged the FLUX.2 klein 4B text encoder and VAE for drop-in ComfyUI use, pushing the sub-second open model past 800k downloads.
Takeaways
- Comfy-Org repackaged FLUX.2 klein 4B as single-file safetensors for ComfyUI, surpassing 800k downloads.
- Bundle includes the 336 MB FLUX.2 VAE, Qwen3-4B text encoder (bf16 and fp4), and both distilled and base transformers.
- Underlying FLUX.2 klein is a 4B rectified flow transformer with sub-second inference on consumer GPUs.
- Distilled 4-step model runs in ~1.2s on an RTX 5090 using 8.4 GB VRAM; base variant takes ~17s.
- Apache 2.0 license on the 4B weights allows royalty-free commercial use.
- Unified single checkpoint handles text-to-image, image editing, and multi-reference composition.
A Comfy-Org package has made Black Forest Labs’ smallest FLUX.2 image model easier to run locally. It converts the VAE, text encoder, and diffusion transformer into standalone safetensors files that fit ComfyUI’s standard model directories. At publication, Hugging Face showed more than 800,000 downloads and 3,659 likes.
The underlying weights come from the upstream 4B release. Black Forest Labs distributes that release as a Diffusers-style directory containing weights, configuration files, and other pipeline metadata. Comfy-Org reorganizes those components for ComfyUI’s native loaders, removing the need to convert or remap the files manually.
One package, three moving parts
The complete repository occupies 27.7 GB because it includes two diffusion checkpoints and two versions of the text encoder. A working installation needs one diffusion checkpoint, one text encoder, and the VAE.
| File | Purpose |
|---|---|
flux2-vae.safetensors |
The 336 MB variational autoencoder that converts between image pixels and the model’s compressed latent representation. |
qwen_3_4b.safetensors |
The 8.04 GB Qwen3-4B prompt encoder stored in BF16 precision. |
qwen_3_4b_fp4_flux2.safetensors |
An FP4-quantized prompt encoder that reduces storage and memory pressure. |
flux-2-klein-4b.safetensors |
The 7.75 GB distilled transformer, tuned for four-step generation. |
flux-2-klein-base-4b.safetensors |
The 7.75 GB base transformer, intended for longer sampling schedules, fine-tuning, and custom control pipelines. |
The 4B label describes the diffusion transformer rather than the entire runtime stack. The Qwen text encoder and VAE add substantial disk and memory requirements, which explains why the full repository is much larger than a single 4-billion-parameter checkpoint.
Klein compresses the FLUX.2 stack
Black Forest Labs built FLUX.2 klein as a smaller rectified-flow transformer derived from the 32B FLUX.2 dev design. Rectified-flow models learn a path from noise to an image representation, then follow that path during sampling. Shorter sampling schedules reduce latency at some cost to flexibility and maximum image quality.
The 4B checkpoint supports text-to-image generation, image editing, and multi-reference editing, where several source images can guide a single output. One checkpoint handles both generation and editing. The model’s Apache 2.0 license permits commercial use and modification under the license terms; adapters, input assets, and other dependencies may carry separate conditions.
Black Forest Labs reports generation and editing times below 0.5 seconds on suitable modern hardware. End-to-end latency depends on resolution, precision, attention implementation, model loading, and memory offloading, so local workflow measurements can be higher.
Four steps deliver the speed
The ComfyUI guide reports the following results for its RTX 5090 workflow:
| Checkpoint | Sampling | Reported time | Reported VRAM | Best use |
|---|---|---|---|---|
| Distilled 4B | 4 steps | About 1.2 seconds | About 8.4 GB | Interactive generation, editing, and high-throughput inference |
| Base 4B | About 50 steps | About 17 seconds | About 9.2 GB | Fine-tuning, adapters, and custom sampling pipelines |
These figures provide a relative comparison between the checkpoints rather than a guarantee for every installation. Image dimensions, batch size, warm-up state, quantization, and CPU offloading can change both latency and peak memory use.
Drop the files into place
ComfyUI expects the diffusion model, text encoder, and VAE in separate directories:
ComfyUI/
models/
diffusion_models/
flux-2-klein-4b.safetensors
flux-2-klein-base-4b.safetensors
text_encoders/
qwen_3_4b.safetensors
qwen_3_4b_fp4_flux2.safetensors
vae/
flux2-vae.safetensors
Most installations need only one file from each pair of alternatives. Choose the distilled transformer for the four-step workflow or the base transformer for training and custom pipelines. Choose the BF16 text encoder when memory allows; the FP4 version is more practical on constrained GPUs.
The official FLUX.2 klein workflow uses ComfyUI’s native nodes, so these files load without third-party extensions. On a 12 GB card, the FP4 encoder can reduce memory pressure, although available resolution and batch size still depend on offloading and the rest of the workflow.
Where the 4B model fits
Klein’s short sampling schedule and unified editing checkpoint suit workloads that depend on rapid iteration:
- Interactive editors: Generate or revise images while a user adjusts prompts and references.
- Game and design pipelines: Produce many drafts or asset variations on consumer hardware.
- Batch services: Favor throughput and lower hardware costs over the highest available fidelity.
- Local prototypes: Test generation and multi-reference editing without calling a hosted API.
Larger FLUX.2 models generally provide a higher ceiling for photorealism, dense typography, difficult prompt adherence, and fine detail. Teams working on those tasks should benchmark klein against dev or pro using representative prompts, resolutions, and latency targets.
External loaders need more metadata
The standalone safetensors files are packaged for ComfyUI. Standard Transformers and Diffusers loaders also expect configuration, tokenizer data, scheduler settings, and conventional weight names or index files. ComfyUI supplies the required loading logic through its own nodes.
Python applications can use the upstream Diffusers repository directly. Applications that consume the Comfy-Org files must retrieve the matching configuration and tokenizer metadata from the upstream release, then load the weights with code that supports standalone state dictionaries. Passing an arbitrarily named safetensors file to from_pretrained will not provide enough information for automatic reconstruction.
Training tools can impose additional component requirements. Some musubi-tuner workflows specifically expect the VAE distributed with FLUX.2 dev, so developers should verify the trainer’s current model-loading instructions before reusing the ComfyUI package for fine-tuning.