Encoding is the VAE’s first move: it shrinks an image into latents, a compact numerical representation that Stable Diffusion can work with more easily. section 4.3.1
The basic workflow is pleasantly simple:
- Start with a normal image, such as a 512×512 frame. section 4.3.1
- Encode it into latents: 262,144 image pixels become roughly 64 latent “pixels,” represented as numbers. section 4.3.1
- Let Stable Diffusion perform most of its work on those latents, then decode them back into an image. section 4.3.1
A Metropolis frame
A 512×512 image from Fritz Lang’s Metropolis becomes a much smaller latent representation. The latents look unintelligible to people, but retain a compact form useful for image generation. section 4.3.1
Figure 4.14 The VAE transforms the image into latents

Inspect the visual transformation from an ordinary image into latents. section 4.3.1









