Classifier-free guidance

Generative models · component · 2022 · images · audio

What it is

Train one model on conditional and unconditional objectives, then interpolate between them at sampling for stronger conditioning.

When to use it

Essentially every conditional generative model since 2022, text-to-image most of all.

Caveats

High guidance scales trade diversity for prompt fidelity and cause oversaturated, artificial-looking samples. It needs two model evaluations per step, roughly doubling sampling cost, and the guided result no longer samples from the true conditional distribution.

Key ideas

  • A sampling technique, not a model
  • Trains one network both with and without the condition, by randomly dropping it
  • At sampling time, extrapolates from the unconditional prediction toward the conditional one

Related architectures

Original paper

Classifier-Free Diffusion Guidance (2022, arXiv)

Browse all 198 architectures

The architecture landscape, in one place.

Two things get called “ML architecture”: the classical statistical model families, and the neural network wirings. Both are here, tagged by what they are and what data they eat.

Start from your problem

Architectures

0 shortlisted