Open any image generator worth its salt and you will find a knob with a name like "guidance scale." In Stable Diffusion tooling it typically sits around 7.5, with 7.5 to 10 cited as the common working range (SoftwareMill overview). It is the same mechanism Jonathan Ho and Tim Salimans described in a short 2022 paper called "Classifier-Free Diffusion Guidance" (arXiv:2207.12598), and it is arguably the most-used post-training trick in generative AI. Four years on, it still has documented failure modes, and a steady stream of papers is trying to fix them.
This explainer covers what the trick does, why it works, what it costs, and where the research stands in late 2026.
The problem: a conditional model is not enough
A text-to-image diffusion model learns a conditional distribution: what images plausibly look like given a prompt. Sampling from that distribution naively produces results that are diverse but often loose, low-contrast, and only vaguely related to the prompt. The model knows what "a husky riding a skateboard" could look like, but ordinary sampling does not push toward the most prompt-faithful instance of it.
The fix, introduced before the "classifier-free" version, is guidance: during sampling, adjust the denoising direction at every step so the trajectory leans toward high-probability regions for the condition. This trades sample diversity for fidelity, in the same spirit as lowering the temperature when generating text (Ho and Salimans, 2022).
Classifier guidance: the 2021 original
The predecessor is classifier guidance, proposed by Prafulla Dhariwal and Alex Nichol in "Diffusion Models Beat GANs on Image Synthesis" (arXiv:2105.05233). The recipe: train a separate image classifier on noisy versions of images, then add the gradient of that classifier's class score to the diffusion model's score estimate during sampling. Turning the strength up makes generated ImageNet samples look more decisively like the requested class, and this was the ingredient behind the era's state-of-the-art FID numbers.
The drawbacks are obvious. You need an external classifier, trained on corrupted inputs, for every thing you want to steer toward. That works for 1,000 ImageNet labels and much less well for open-ended text prompts, which is precisely the setting text-to-image models were racing into.
Classifier-free guidance: one network, two moods
Ho and Salimans' observation was that you do not need a classifier at all. During training, the conditioning signal (the class label or text embedding) is randomly dropped roughly 10 to 20 percent of the time. The same network therefore learns both the conditional score, given the prompt, and the unconditional score, given nothing.
At sampling time, you run the network twice per denoising step, once with the condition and once with a null condition, and combine the two noise estimates by extrapolation. In the paper's convention, the guided estimate pushes the conditional prediction further away from the unconditional one, scaled by a guidance weight. At zero guidance you get plain conditional sampling; as the weight grows, the prompt pulls harder. The original text-to-image systems of the moment, Google's Imagen (arXiv:2205.11487) and OpenAI's DALL-E 2, both built on guidance to get their results, as Sander Dieleman noted in a widely read overview calling guidance "a cheat code for diffusion models" (sander.ai).
A useful intuition from the same line of analysis: guidance amounts to sampling from the conditional distribution with the condition raised to a power. You are not drawing from p(image | prompt) anymore; you are drawing from something closer to the unconditional distribution times the likelihood of the prompt, weighted harder than probability alone would justify. That is why it sharpens adherence and squeezes out diversity at the same time.
The original paper measured exactly that trade-off on ImageNet: best FID (a diversity-sensitive quality metric) came at small guidance weights, best Inception Score (an adherence-sensitive one) at strong weights, with a monotonic swap between them as the weight rises (arXiv:2207.12598). Karras and colleagues later formalized the same behavior as a quality-versus-distortion trade-off that guidance implements at the sampler level, not the training level (arXiv:2206.00364).

The bill: every guided step costs two forward passes
The mechanism has a price. Because each step needs a conditional and an unconditional evaluation, guided sampling is roughly twice as expensive as unguided sampling of the same network (Dieleman). Meng et al. made that bottleneck explicit and proposed distilling the guidance effect into a single network evaluation, training the student to predict the composed, guided output directly (arXiv:2210.03142). That line of work now runs through every fast lane in the field: few-step and turbo-style distilled models bake guidance into the student prediction so users get strong prompt following at single-pass cost (arXiv:2607.24731).
What breaks, and the industry that grew up around it

Three problems with vanilla CFG are now well documented in the literature:
- Oversaturation at high scales. High guidance weights blow out colors and produce artifacts. Lin et al. traced part of this to training-time flaws that compound under CFG and proposed rescaling fixes (the CFG-Zero* line) (arXiv:2305.08891). A 2024 analysis decomposed the guidance term into components parallel and orthogonal to the conditional prediction, found the parallel component causes the saturation while the orthogonal one improves quality, and proposed down-weighting the former (adaptive projected guidance) (arXiv:2410.02416).
- Guidance drifts off-topic. The conditional-minus-unconditional difference is not guaranteed to point in the direction the user means. "Stay on topic with Classifier-Free Guidance" (Sanchez et al., NeurIPS 2023) showed that large scales can amplify features unrelated to the prompt and proposed decomposing the guidance direction to steer only the components the user asked for, including negative-prompt control (arXiv:2306.17806). Negative prompting, a staple of Stable Diffusion practice, is this mechanism's user-facing sibling.
- One scalar is too crude. A fixed scale applied identically to all prompts and all denoising steps is rarely optimal. Kynkäänniemi et al. showed guidance matters mostly in the middle of the trajectory and applying it in a limited interval improves both sample and distribution quality (arXiv:2404.07724). Adaptive schedules that vary the strength over time (arXiv:2502.10574) and prompt-aware predictors that choose the scale per prompt (arXiv:2509.22728) followed.
The pace has not slowed. Searching arXiv titles for "classifier-free guidance" in November 2026 returns dozens of results spanning speech synthesis, one-step video generation, robotics policies, target-speaker recognition and zero-shot text-to-speech, most of them from 2025 and 2026. The mechanism has left images behind: masked diffusion language models run on the same conditional-versus-unconditional extrapolation (arXiv:2608.08082), and the "Stay on topic" authors were already drawing the analogy between CFG and steering autoregressive language models with contrastive prompts in 2023.
The takeaway
Classifier-free guidance is not part of any model's architecture. It is an inference-time operation: train the network so it can ignore its own condition, then at sampling time subtract the ignoring from the obeying and turn the difference up. That single move bought text-to-image systems most of their prompt fidelity in 2022, doubled their compute bill, and created a research subfield that is still spending 2026 making the knob smarter than a scalar.
Sources
- Ho, J. and Salimans, T. (2022). Classifier-Free Diffusion Guidance. https://arxiv.org/abs/2207.12598
- Dhariwal, P. and Nichol, A. (2021). Diffusion Models Beat GANs on Image Synthesis. https://arxiv.org/abs/2105.05233
- Saharia, W. et al. (2022). Photorealistic Text-to-Image Diffusion Models with Deep Language Understanding (Imagen). https://arxiv.org/abs/2205.11487
- Dieleman, S. (2022). Guidance: a cheat code for diffusion models. https://sander.ai/2022/05/26/guidance.html
- Dieleman, S. (2024). The paradox of diffusion distillation. https://sander.ai/2024/02/28/paradox.html
- Karras, T. et al. (2022). Elucidating the Design Space of Diffusion-Based Generative Models. https://arxiv.org/abs/2206.00364
- Meng, C. et al. (2023). On Distillation of Guided Diffusion Models. https://arxiv.org/abs/2210.03142
- Lin, S. et al. (2023). Common Diffusion Noise Schedules and Sample Steps are Flawed. https://arxiv.org/abs/2305.08891
- Sadat, S. et al. (2024). Eliminating Oversaturation and Artifacts of High Guidance Scales in Diffusion Models. https://arxiv.org/abs/2410.02416
- Sanchez, G. et al. (2023). Stay on topic with Classifier-Free Guidance. https://arxiv.org/abs/2306.17806
- Kynkäänniemi, T. et al. (2024). Applying Guidance in a Limited Interval Improves Sample and Distribution Quality in Diffusion Models. https://arxiv.org/abs/2404.07724
- Malarz, D. et al. (2025). Classifier-free Guidance with Adaptive Scaling. https://arxiv.org/abs/2502.10574
- Zhang, X. and Li, C. (2025). Prompt-aware classifier free guidance for diffusion models. https://arxiv.org/abs/2509.22728
- Zhou, F. et al. (2026). Commitment Before Realization: When Classifier-Free Guidance Becomes Unnecessary in Masked Diffusion Language Models. https://arxiv.org/abs/2608.08082
- Li, B. et al. (2026). Rethinking Classifier-Free Guidance in On-Policy Diffusion Distillation. https://arxiv.org/abs/2607.24731
- SoftwareMill (2024). Classifier-free diffusion model guidance. https://softwaremill.com/classifier-free-diffusion-model-guidance
