← AI Terminology

Classifier-Free Guidance

Classifier-free guidance (CFG) steers diffusion sampling by extrapolating between conditional and unconditional score estimates, amplifying adherence to the condition (e.g. text) without a separate classifier.

It is the standard control knob for prompt strength in modern diffusion.
Why It Matters in AI
CFG transformed text-to-image quality by trading diversity for prompt fidelity with one scale parameter. Every T2I user and paper tunes guidance strength.
Key Points
Aspect Description
Use Stable Diffusion, Imagen-style systems
Origin Ho & Salimans, classifier-free guidance
Related CLIP guidance (older), ControlNet
Scale s Higher → stronger prompt match, less diversity/artifacts risk
Training Randomly drop condition so model learns both
Mechanism ε̃ = ε_uncond + s(ε_cond − ε_uncond)
Simple Analogy
Mixing a pure daydream with a tightly briefed illustration, then pushing past the briefed mix to overshoot toward the brief — volume knob on obedience.
Common Usage Examples
  • Set CFG 3–12 in SD UIs and watch fidelity
  • Too high CFG → oversaturated artifacts
  • Papers report CFG scales with samples
  • Combine CFG with ControlNet carefully
Summary
In short: Classifier-free guidance amplifies conditional diffusion signals — the standard slider for how strongly images follow prompts.