Diffusion & generation

VAE (latent autoencoder)

Compresses images into a small latent space where diffusion actually happens, then decodes the result back to pixels.

First page of Auto-Encoding Variational BayesIntroduced inDec 2013Auto-Encoding Variational BayesKingma & Welling · arXiv 1312.6114 ↗
VAE: squeeze in, diffuse, decode outthe encoder shrinks the image ~8× per side · the decoder paints it backlatent · diffusion runs herepixelspixels again

Latent diffusion models never diffuse pixels directly. A variational autoencoder first compresses the image ~8× per side into a compact latent tensor, the diffusion process denoises in that space, and the VAE decoder renders the final latent back into pixels. This is the trick that made high-resolution diffusion affordable, and it is why generation graphs end with a VAE decode stage.

Adoption over time

Share of new models that have included a VAE over time.

6%202220232024202520266%20222023202420252026

See it in real models

Open any of these on hfviewer to find this block in the interactive architecture graph.

Comfy-Org/MiniMax-H3 architecture graphComfy-Org/MiniMax-H3↓ 17.3M · ♡ 2kOpen in visualizer MiniMaxAI/MiniMax-H3 architecture graphMiniMaxAI/MiniMax-H3image-text-to-video · ↓ 4.0M · ♡ 4kOpen in visualizer Comfy-Org/Krea-2 architecture graphComfy-Org/Krea-2↓ 2.2M · ♡ 465Open in visualizer microsoft/TRELLIS.2-4B architecture graphmicrosoft/TRELLIS.2-4Bimage-to-3d · ↓ 1.6M · ♡ 1kOpen in visualizer stabilityai/stable-diffusion-xl-base-1.0 architecture graphstabilityai/stable-diffusion-xl-base-1.0text-to-image · ↓ 1.6M · ♡ 8kOpen in visualizer Lightricks/LTX-2.3 architecture graphLightricks/LTX-2.3image-to-video · ↓ 1.6M · ♡ 2kOpen in visualizer stable-diffusion-v1-5/stable-diffusion-v1-5 architecture graphstable-diffusion-v1-5/stable-diffusion-v1-5text-to-image · ↓ 1.4M · ♡ 1kOpen in visualizer stabilityai/sdxl-turbo architecture graphstabilityai/sdxl-turbotext-to-image · ↓ 1.1M · ♡ 3kOpen in visualizer Tongyi-MAI/Z-Image-Turbo architecture graphTongyi-MAI/Z-Image-Turbotext-to-image · ↓ 794k · ♡ 5kOpen in visualizer nvidia/Cosmos3-Edge architecture graphnvidia/Cosmos3-Edge↓ 789k · ♡ 170Open in visualizer microsoft/VibeVoice-ASR architecture graphmicrosoft/VibeVoice-ASRautomatic-speech-recognition · ↓ 697k · ♡ 1kOpen in visualizer black-forest-labs/FLUX.2-dev architecture graphblack-forest-labs/FLUX.2-devimage-to-image · ↓ 655k · ♡ 2kOpen in visualizer

Browse all 232 models with this in the catalog →

Related concepts

hfviewer renders the full architecture of 4,000+ Hugging Face models as interactive graphs. Hover any block to see what it does, with this model’s real numbers.

Browse all model graphs →