FLUX-3-Image-Klein-Base
FLUX 3 Image Klein Base is Black Forest Labs’ open-weight image model. NeMo AutoModel integrates its image-only Flux3Transformer2DModel for text-to-image generation and instruction-based image editing, using flow matching and Qwen3-VL text conditioning.
Model Reference
Model Architecture
Available Models
The training workflow below covers FLUX 3 Image Klein Base, the non-distilled model that uses classifier-free guidance. The separate black-forest-labs/flux-3-image-klein checkpoint is distilled and is not covered by this training validation. The herzogenhorn and diffusers-internal-dev repositories are preview sources and require access; the recorded validation used pinned preview weights, not an independently downloaded release checkpoint.
Example Recipes
Run the commands below from the linked recipe revision.
The 100-step validation covers LoRA training. The full fine-tuning templates have not undergone the same end-to-end validation.
Checkpoint and Environment Setup
Install NeMo AutoModel with diffusion dependencies using the Installation Guide. Run the commands below from the AutoModel repository root in that environment.
Use the release checkpoint
The release repository includes Diffusers weights and modular_model_index.json, alongside the original BFL package. Download the base repository for fine-tuning; the separate distilled repository is intended for inference. The release model card uses a source installation of Diffusers:
After authenticating with an authorized Hugging Face account, use the local directory containing modular_model_index.json and the transformer, VAE, text encoder, and tokenizer component directories. AutoModel loads those modular components directly; converting the release repository’s original BFL files is not required. The variants/fp8r and variants/nvfp4 directories are quantized inference packages and are outside the BF16 training validation documented here.
This release setup follows the model card and the release repository layout announced by Black Forest Labs. The release weights and public Diffusers revision were not independently exercised in the recorded AutoModel runs. The pinned preview workflow below identifies the exact sources used for validation.
Reproduce the validated preview
The recorded runs used a locally converted preview checkpoint and the flux3-image branch of the preview Diffusers repository at revision 0a774136f798ec676d991c9bae8a5215bb299f48. This revision provides Flux3Transformer2DModel and its modular pipeline. Access to that source repository is separate from Hugging Face checkpoint access.
To reproduce that environment, install the matching checkout after setting up AutoModel:
Convert a downloaded original herzogenhorn/f3-image-small package with the tool from that Diffusers checkout:
The separately hosted diffusers-internal-dev/f3-small-img repository is another modular preview source; it was not the source of the recorded validation. Conversion is needed only for the original preview package, not for a repository that already provides the modular components.
The examples use uv run --no-sync to preserve the installed Diffusers revision. Replace the example /data paths with your own directories.
NeMo AutoModel loads the transformer for training and the complete modular pipeline for generation. Preprocessing caches VAE latents and text embeddings offline. The image VAE runs in FP32; the validated transformer and LoRA compute path uses BF16. Text conditioning uses the checkpoint-selected Qwen3-VL layers, pads prompts to multiples of 80 tokens with a maximum length of 8192, and preserves the training-time padding position IDs.
Text-to-Image LoRA Fine-Tuning
Prepare the dataset
This example caches 32 image-caption pairs from Tuxemon at the 512p resolution preset:
Train for 100 steps
The following overrides adapt the LoRA recipe to two GPUs, with native attention, activation checkpointing, global batch size 2, and a 10-step warmup. This configuration was validated on two NVIDIA H100 80GB GPUs.
Keep the text-to-image recipe’s LoRA target list: it excludes the inactive reference-image stream. The recipe uses rank-4 BF16 adapters.
Generate images
Point model.lora_weights at the saved checkpoint’s model/ directory:
The generation config supplies a prompt, seed 42, 50 denoising steps, guidance scale 3.5, and a 1024 x 1024 output. Edit its inference.prompts list for your task. Omit the LoRA override to generate with the base checkpoint.
Image-Editing LoRA Fine-Tuning
Prepare paired images
Image editing uses a target image, one clean source image, and an instruction. The source conditions the generation stream; it is not a second training target.
Configure adapters and train
Copy examples/diffusion/finetune/flux3_i2i_flow.yaml to a local configuration. Add the following top-level peft block so adapters also train the active reference-image stream:
Run the same native training entry point, using your edited configuration:
For generation, use the same native generation entry point with the image-editing LoRA checkpoint. In a copy of generate_flux3.yaml, set inference.prompts to editing instructions and inference.input_images to the corresponding source-image paths, one per prompt. Use output dimensions that preserve the source image’s aspect ratio, with height and width divisible by 16. The tested editing workflow uses one reference image per prompt.
Validation Scope
Validation used the original BFL checkpoint at revision f96bdc5547b7b13c98d7958d3d4e977fe1a8be47, converted locally with the Diffusers revision above, and AutoModel revision 28488ad14b68620a4de2e1d5060cd0980395223d. The separately hosted modular preview checkpoint was not independently validated in that run.
The port at AutoModel revision e15d7708a5f141997870872214a8446cce0a83b2 (with local test-return-contract and documentation-slug updates) repeated both native 100-step LoRA runs on two H100 GPUs, then reloaded the saved adapters and generated two T2I samples and two held-out image edits. Both T2I samples were coherent; image editing preserved the source scene, but instruction fulfillment was mixed. These reruns did not repeat the earlier parameter-by-parameter loading audit or resume check.
These runs verify the training and generation workflow on a small dataset; they do not establish a quality improvement or a performance benchmark. Full-parameter fine-tuning, multi-node execution, tensor/context parallelism greater than one, image-editing resume, and FP8/NVFP4 training remain unvalidated. This integration covers image generation and editing, with no video or audio workflow.