liveBook · Manning

Encoding

As explained in Local Image Generation

The transformation of an image into a compact latent representation.

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

How Local Image Generation covers it

How deep it goes
Defines encoding, quantifies its reduction, and connects it to decoding without developing VAE internals.
Examples
Uses a 512×512 image from Metropolis and visualizes its transformation into latents.
What you can do after
Evaluate/understand why image-generation systems process compact latents instead of ordinary images.
How it connects
Connects encoding with variational autoencoders, latent space, decoding, and Stable Diffusion.

Also explained in

Compare how 10 books explain encoding →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Local Image Generation. The section links point to the parts of the book it draws on.