The idea
Pixel-space diffusion can be expensive because its denoising process repeatedly works over a large image. This paper first uses an autoencoder to represent an image in a smaller latent space, then runs diffusion there. The authors describe a trade-off between reducing computation and preserving visible detail.
Cross-attention lets the generator condition on inputs such as text. The result is a general framework for high-resolution image synthesis and editing, and a key foundation for the wave of text-to-image systems that followed.
Read it with the code
Follow the boundary between the first-stage autoencoder and the diffusion model in the CompVis repository. That separation is the paper’s practical insight: the model does not have to denoise every pixel directly at every step.
Read the original.
Every story starts with a source. Check the methods and claims for yourself.
Read the paper · arXiv:2112.10752 ↗CompVis latent-diffusion code ↗