Skip to content

Archive

Generative AI

1 articles
Artificial Intelligence 05 Sep 2026 9 min read

Understand Classifier-Free Guidance in Diffusion Models

A conditional diffusion model may understand a prompt and still produce samples that only weakly reflect it. During generation, developers therefore often want a way to push the denoising trajectory toward the condition without training a separate classifier for every prompt or label. Classifier-free guidance (CFG) is a widely used way to do that. At each denoising step, the model is evaluated with the condition and without it. The difference between those predictions gives a direction associated with the condition, and a guidance scale controls how strongly sampling moves along that direction.