liveBook · Manning

Resolution

As explained in Build a Text-to-Image Generator (from Scratch)

Image resolution is the spatial dimensions and corresponding level of discrete visual detail represented by an image.

Image resolution specifies an image’s spatial dimensions and the discrete visual detail those dimensions represent. Diffusion systems distinguish working resolution from final display resolution: latent images can have shape 4 × 64 × 64, while VAE decoding produces 3 × 512 × 512 color images. Higher-resolution generation therefore handles greater dimensionality and more complex spatial and color relationships. section 9.3.3 section 7.5

Resolution enters the generation pipeline in several distinct ways:

  • Direct diffusion on high-resolution images increases training and inference cost, so latent diffusion performs the process in a smaller space. section 9.5
  • The lower-dimensional latent representation improves speed but reduces image quality until a variational autoencoder decoder reconstructs the high-resolution output. section 9.1 section 9.5
  • Stable Diffusion exposes output dimensions directly; one demonstrated generation uses width 768 and height 512 instead of the 512 × 512 example. section 10.1
  • Increasing resolution demands deeper U-Nets and attention mechanisms to preserve relevant fine details amid larger feature representations. section 7.0 section 7.5

From latent image to final image

A latent diffusion model progressively denoises a 4 × 64 × 64 latent image, then passes the clean latent through a pretrained VAE decoder to obtain a 3 × 512 × 512 image. The banana-shaped rider becomes clearer as denoising advances, while decoding converts each intermediate latent into a high-resolution view. section 9.3.3

Figure 9.9 Converting the intermediate latent images into the high-dimensional space. The five latent images in figure 9.8, each with a shape of 4 × 64 × 64, are converted by the pretrained VAE decoder into the high-dimensional space, with a shape of 3 × 512 × 512.

Inspect the concrete shape transition from five 4 × 64 × 64 latent images to five 3 × 512 × 512 decoded outputs. section 9.3.3

How Build a Text-to-Image Generator (from Scratch) covers it

How deep it goes
Traces 4 × 64 × 64 latent tensors through VAE decoding to 3 × 512 × 512 outputs and demonstrates 768 × 512 generation.
Examples
Uses banana rider, lion and tiger outputs, astronaut-unicorn prompts, and a 768 × 512 beach scene.
What it assumes
Assumes diffusion-model and latent-space basics while showing how a VAE decoder restores high-resolution output.
What you can do after
Operate/configure Stable Diffusion through diffusers, selecting width and height and inspecting latent-to-output conversion.
How it connects
Connects image resolution to latent diffusion, variational autoencoders, Stable Diffusion, diffusion models, and computational cost.

Also explained in

Compare how 4 books explain resolution →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Build a Text-to-Image Generator (from Scratch). The section links point to the parts of the book it draws on.