All models

AutoencoderKLFlux2

The FLUX.2 variational autoencoder, the retrained latent space under every FLUX.2 flow backbone.

Diffusion and generative · 296 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (25 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
84M
Operations
296
Framework
PyTorch
Recurrent
No
Published
2025
Authors
Black Forest Labs
License
Apache-2.0
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m142
Graph hash
df0669b24ada25e8b9c4dc9796bca79787c76169066f9a7dd67237778095a314
Skeleton hash
5b89876944428ce8aec11eb30e910f207fa82b641dffcfdba8839acb1b222832
Architecture hash
4b99a42c1066ccd681c2d246158f0fc46ee112d10755e584f3aeae94f36bab7a
Diagram SHA-256
24e61629bae2cacca657b60faea8d897de11b909e5d999acdcc29ebff384dcbd
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

How this diagram was made

diffusers.AutoencoderKLFlux2()

What it is

The graph captured here is the FLUX.2 VAE, a new variational autoencoder for latent representations that provide an optimized trade-off between learnability, quality and compression rate. It provides the foundation for all FLUX.2 flow backbones. The backbone it serves, FLUX.2 [dev], is a 32B parameter flow matching transformer model for generating and editing images.

Black Forest Labs re-trained the model's latent space from scratch to get better learnability and higher image quality at the same time, a step towards solving what it calls the Learnability-Quality-Compression trilemma. The official repository says the FLUX.2 autoencoder has considerably improved over the FLUX.1 autoencoder. The FLUX.2 [dev] weights sit under the FLUX Non-Commercial License. The VAE, by contrast, is available on HF under an Apache 2.0 license. A technical report on the VAE exists, titled FLUX.2: Analyzing and Enhancing the Latent Space of FLUX, but only its title was captured here.

FLUX.2 itself couples the Mistral-3 24B parameter vision-language model with a rectified flow transformer. It can combine up to 10 reference images into a novel output at resolutions up to 4MP. FLUX.2 [dev] was released on 25.11.2025 as a 32B parameter model for text-to-image generation and image editing.

Key idea. The FLUX.2 VAE re-trains the latent space from scratch for a better trade-off between learnability, quality and compression rate, and underpins every FLUX.2 flow backbone.

  • FLUX.2
  • FLUX.2 VAE
  • AutoencoderKLFlux2
  • flux2 autoencoder
  • FLUX.2 [dev]
  • FLUX.2 [klein]
  • latent space
  • variational autoencoder
  • Black Forest Labs
  • flux
  • flow matching transformer
  • mmdit

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{flux2mmdit2025,
  title = {FLUX.2: Frontier Visual Intelligence},
  author = {Black Forest Labs},
  year = {2025}
}