liveBook · Manning

Conditioning

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

Conditioning information is auxiliary input supplied to a generative process to influence the characteristics of its output.

Conditioning information is auxiliary input supplied to a generative process to influence its output. In diffusion models, it can be a class label or text prompt that steers image generation toward a desired concept. section 6.1.1

Classifier-free guidance uses conditioning in three stages:

  • Train the diffusion model both with conditioning and without it, allowing conditional and unconstrained generation. section 6.1.1
  • During inference, combine the model’s conditional and unconditional predictions to steer partially denoised samples. section 6.1.1
  • Adjust the CFG scale to trade adherence to the condition against output diversity: higher values strengthen alignment, while lower values preserve creativity. section 6.1.1

Prompt-guided image generation

A text prompt supplies conditioning information to a diffusion model. Class labels work similarly, while the model’s unconditional prediction provides a reference for controlling how strongly the requested concept shapes the image. section 6.1.1

Figure 1.10 The eight steps to building a text-to-image generator from scratch

Use the eight-step roadmap to locate conditioning after basic diffusion and before CLIP-guided text-to-image generation. section 1.4

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

How deep it goes
Explains conditional and unconditional training, prediction combination, CFG scale, and the resulting quality-diversity trade-off.
Examples
Uses class labels, text prompts, partially denoised samples, and conditional-versus-unconditional predictions as concrete examples.
What it assumes
Assumes basic forward and reverse diffusion before introducing conditioning as a subsequent generation-control step.
What you can do after
Apply classifier-free guidance to control how closely generated images match conditioning information.
How it connects
Connects conditioning information to diffusion models, classifier-free guidance, class labels, text prompts, and CLIP guidance.

Also explained in

Compare how 2 books explain conditioning →

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.