FLUX.3 Image Klein Is Now Available in Diffusers
FLUX.3 Image Klein adds two Diffusers checkpoints for fast text-to-image, image-to-image, layout control, quantized loading, and LoRA training.
Key Takeaways
- FLUX.3 Image Klein offers two open checkpoints in Diffusers, with the distilled model generating a 1024 × 1024 image in about 2 seconds on an H100.
- It supports text-to-image generation, multi-reference image-to-image editing, and bounding-box layout control for precise placement and movement of elements.
- Quantized NVFP4 and FP8 weights can be loaded from a single file, enabling use on smaller GPUs, while LoRA training scripts support both generation and editing tasks.
- The base checkpoint uses 50-step classifier-free guidance and is intended for fine-tuning, whereas the distilled checkpoint is optimized for fast inference.
- Internally, FLUX.3 uses a latent-space flow model with Qwen3-VL text encoding and token packing that turns a 1024 × 1024 image into 4,096 transformer tokens.
Black Forest Labs has made two open checkpoints available in the FLUX.3 Image Klein collection, and users can generate images immediately through a Hugging Face space. The distilled checkpoint produces a 1024 × 1024 image in about 2 seconds on an H100, while the same model supports text-to-image generation, multi-reference image-to-image work, and bounding-box layout control. Quantized NVFP4 and FP8 weights can be loaded with `from_single_file` for smaller GPUs, low-rank adaptation (LoRA) training scripts cover both text-to-image and image editing, and the model ships as a Modular Diffusers pipeline so builders can remove blocks or add their own.
One model for three image tasks
For text-to-image prompts, FLUX.3 responds best to a full scene description that names the subject, setting, light, composition, and style. The official prompting guide from Black Forest Labs has more tips. The distilled checkpoint generates a 1024 × 1024 image in 16 steps by default, and `height`, `width`, or `num_inference_steps` can change those settings.
For image-to-image work, users pass a reference image, or several images, with the `image` argument and write the prompt as a caption of the desired image, including the requested change. Multiple references are addressed in the prompt as `<ref_image_0>`, `<ref_image_1>`, and so on, in the order they are passed to `image`.
The layout-control path adds a JSON list of regions after the caption. Each region includes an `id`, a `bbox`, and a `desc`, and the caption mentions the region as `<id>`. Boxes are written as `[y_min, x_min, y_max, x_max]`, with y first, on a normalized 0 to 1000 scale, so the same box works at any image size. For edits, each region records where its content comes from, using `src_bbox` in the reference, and where it goes, using `tgt_bbox` in the output. A region with the same source and target boxes stays where it is. The release example moves a knitted knight up and to the left while pinning the backdrop, the cliff, the needle, the dragon, and the fire.
The base checkpoint runs 50 steps with classifier-free guidance and is the one to fine-tune. The distilled checkpoint is the fast path used for the timing and prompt examples above.
Smaller GPUs, single files, and custom LoRA training
Black Forest Labs also ships the transformer as a single file in bf16 and in two quantized formats: `fp8r`, rowwise FP8, and `nvfp4`. Any of them can be loaded with `from_single_file`, then the other components are loaded by name so the bf16 transformer is not downloaded again. For the unquantized single file, users can point to `model.safetensors` in the Hugging Face model repository and drop `quantization_config`.
Because FLUX.3 works for both text-to-image and image-to-image, it can serve as a base for custom LoRA adapters. `diffusers` ships DreamBooth LoRA training scripts for both tasks, and users can also train with Ostris' AI Toolkit. The release shows a text-to-image example that learns a tarot-card style from the `multimodalart/1920-raider-waite-tarot-public-domain` dataset, triggered with `trtcrd`. To reduce memory use, the example suggests `--gradient_checkpointing`, `--cache_latents`, and `--use_8bit_adam`. `--gradient_checkpointing` recomputes activations in the backward pass, which lowers video RAM usage (VRAM) but makes training slightly slower; `--cache_latents` pre-encodes images and frees the variational autoencoder (VAE); and `--use_8bit_adam` keeps optimizer states in 8-bit.
A grid of adapters trains the same tarot style with different LoRA ranks and optimizers, and the adapters are available on the Hub at `diffusers-modular/flux3-tarot-lora`. More training features and configurations are documented in the DreamBooth FLUX.3 README. For instruction-based editing, the `train_dreambooth_lora_flux3_klein_img2img.py` script trains on reference-image, target-image, and instruction triplets, with the reference addressed in the prompt as `<ref_image_0>`. The README also covers all options and the full image-to-image example.
The memory section gives three ways to reduce GPU pressure: load a quantized transformer, run the text encoder separately and free it, or turn on automatic CPU offloading. The text encoder runs only once per image before denoising, which is why the release describes an “Encode once, generate many” pattern. Automatic CPU offloading moves each component to the GPU only while it runs, but the release notes that this path was not benchmarked.
Speed, architecture, and how the tokens move
End-to-end timings for the distilled checkpoint use 16 steps, averaged over three runs after a warmup on a single NVIDIA H100 80GB GPU, with no offloading and the default attention backend. A reference image roughly doubles the time. Reference tokens join the same sequence as the text and the image being generated, so a 1024 × 1024 reference adds 4,096 tokens to every transformer call.
FLUX.3 takes three kinds of tokens: text, the noisy image being generated, and optional reference images. It is a latent-space flow model for image generation. The denoiser takes latents as inputs and produces latents as outputs, and a VAE decodes those latents back to pixels. FLUX.3 uses the same VAE architecture as Flux.2. The FLUX.2 VAE compresses an image 8 times in each direction into 32 channels, then packs every 2 by 2 patch of that latent into a single token with 128 channels. One token covers a 16 by 16 pixel patch, so a 1024 × 1024 image becomes a 64 by 64 grid of 4,096 tokens. The noisy image starts as random noise of exactly that shape, and a reference image goes through the same VAE encoder and packing while keeping its own size.
The text encoder is Qwen3-VL, a vision-language model. FLUX.3 does not use only its last layer. It reads hidden states from eight of the 36 layers, specifically layers 4, 8, and continuing through 32, then stacks them so each text token becomes an 8 by 2560 equals 20,480-dimensional vector before a linear layer projects it to the transformer's width of 3072. This gives the transformer features from several depths of the language model. The prompt is padded to a multiple of 80 tokens, and the transformer attends to the padding too, which is why the pipeline takes one prompt per call.
The transformer processes tokens in two stages. Stage 1 uses per-mode blocks: text has its own 5 blocks, the noisy image has its own 5 blocks, and reference images have their own 5 blocks. Stage 2 concatenates the streams into one sequence, `[text | image | reference]`, and sends them through 28 blocks that share one set of weights. The stages differ in who can attend to whom. In Stage 1, each stream attends only to itself, so each token type is refined on its own terms first. In Stage 2, everything attends to everything, allowing the image to learn from the text and the references. By comparison, FLUX.2's double-stream blocks also give text and image separate weights but let them attend to each other from the start; FLUX.3 keeps the streams fully apart first, then merges them. At the end, the text and reference tokens are dropped, and only the image tokens pass through output layers that predict how to move them one step toward a clean image.
Every block in either stage has the same shape: attention and the multilayer perceptron run in parallel on the same normalized input, and their sum is added back to the residual stream. Each block starts with a LayerNorm that has no learned scale or shift of its own. The scale, shift, and gate come from a timestep embedding instead, a process the release calls modulation. Inside attention, queries and keys are root-mean-square normalized and receive rotary position embeddings, or RoPE. In a joint block, all tokens share the same weights, but text, image, and reference tokens each get their own scale, shift, and gate.
FLUX.1 and FLUX.2 use one timestep embedding to modulate every token. FLUX.3 changes that: the noisy image tokens are modulated by the current timestep t, while text and reference tokens are always modulated by timestep 0, meaning “clean, nothing to denoise here.” Even a reference that looks almost the same as the output is marked as given context, not as something to generate. The distilled checkpoint is a flow map and is also told the timestep each step jumps to. That second timestep gets its own embedding, added to every token's modulation, so each of its 16 steps can make a larger jump.
Attention alone does not know where a token is, a property called permutation equivariance. RoPE fixes that by rotating each query and key by an amount that depends on the token's position. FLUX.3 uses four position axes, `(t, h, w, l)` for timestep, height, width, and length of sequence, and gives each axis a quarter, or 32 dimensions, of every 128-dimensional attention head. Text tokens line up along l, like words in a sentence. The image and references are 2D grids in h and w, separated from each other along l. Because a reference uses the same h and w coordinates as the output, “the same spot in the reference” has a precise meaning to the model, which supports the `src_bbox` and `tgt_bbox` editing behavior.
The denoising loop starts from pure noise. At each of the 50 steps, the transformer predicts a velocity, the direction from noise toward a clean image, and the scheduler takes one step along it. At every step, users can read off the model's current guess of the final image. The release shows a fox example where the fox, its pose, and the light are already in place by step 10, while the noise level is still 0.97. The snow-laden branches and the texture of the fur only appear in the last few steps. FLUX.3's scheduler uses a large time shift of 6.93, which keeps the noise level high for most of the run: 44 of the 50 steps happen above sigma equals 0.5. The release says that figure was made by adding one small block to the pipeline, which also points to the Modular Diffusers design.
What readers can do next
The practical path is short: install the latest `diffusers` and `transformers` packages, which include support for the Qwen3-VL text encoder, then load the distilled checkpoint and generate an image. The release also links to workflows, points newcomers to a beginner-friendly flow-matching tutorial and a video, and makes the two FLUX.3 Image Klein checkpoints reachable through a Hugging Face space. For teams that want to inspect or change the pipeline, FLUX.3 ships as a Modular Diffusers pipeline, so blocks can be removed or replaced. For users without the largest GPUs, the single-file quantized checkpoints and the memory-saving options make the model more reachable, while the LoRA scripts make it possible to train custom styles or editing behavior.

Comments (0)