Skip to main content
FLUX.1 is a Transformer-based image generation model from Black Forest Labs. Unlike Stable Diffusion, FLUX.1 uses a Diffusion Transformer (DiT) architecture with two text encoders and a dedicated AutoEncoder rather than a VAE.

Architecture

FLUX.1 departs from the UNet-based pipeline used in SD 1.x/2.x and SDXL:
  • DiT (Diffusion Transformer) — replaces the UNet. Operates on patchified latent representations using bidirectional attention.
  • Dual text encoders
    • CLIP-L — fast encoder for short-to-medium prompts.
    • T5-XXL — large language model encoder for long, complex prompts (up to 512 tokens by default).
  • AutoEncoder (AE) — encodes and decodes between pixel and latent space. Not VAE-compatible with SD 1.x/2.x or SDXL.

Versions

FLUX.1-dev is distilled with specific guidance scale values. During training, set --guidance_scale=1.0 to disable the guidance scale. The default value (3.5) is for inference, not training.

Required model files

Download the following files before training:
Do not use the weights from the Diffusers-format subfolder inside the FLUX.1-dev repository. These are in Diffusers format and cannot be used directly. Use the top-level flux1-dev.safetensors and ae.safetensors files.

Available training methods

LoRA training

Use flux_train_network.py with --network_module=networks.lora_flux:
--timestep_sampling="flux_shift" and --model_prediction_type="raw" are the recommended settings for FLUX.1-dev LoRA training.

Memory optimization

FLUX.1 is a large model. Use these options to reduce VRAM usage:

Key memory options

  • --fp8_base — trains FLUX.1, CLIP-L, and T5-XXL in FP8 format. Significantly reduces VRAM at a potential quality cost.
  • --blocks_to_swap <n> — offloads n Transformer blocks to CPU. FLUX.1 supports up to 35 blocks. Cannot be combined with --cpu_offload_checkpointing.
  • --cache_text_encoder_outputs — caches CLIP-L and T5-XXL outputs; reduces memory usage but disables text encoder LoRA training.
  • --cache_latents / --cache_latents_to_disk — caches AE outputs.

Key training parameters

Incompatible options

The following SD 1.x/2.x arguments are not used for FLUX.1 training and should not be specified:
  • --v2, --v_parameterization, --clip_skip
  • --max_token_length (use --t5xxl_max_token_length instead)
  • --split_mode (deprecated; use --blocks_to_swap)