CFG scale (classifier-free guidance)
CFG scale controls how strongly a diffusion image model follows its text prompt — higher values stick closer to the prompt, lower values explore more.
Classifier-free guidance (CFG) is a sampling trick that interpolates between the conditional (prompt-driven) and unconditional model output. Typical settings: 7–9 for Stable Diffusion 1.5/SDXL, 3.5–5 for Flux, 2–4 for SD3. High CFG produces over-saturated, hyper-prompted images; low CFG drifts off-prompt but feels more natural. New flow-matching models (Flux, SD3) use much lower CFG than older diffusion models — copying old SDXL CFG values onto Flux ruins the result.
When to use cfg scale (classifier-free guidance)
- Tuning prompt adherence vs. naturalness on a per-model basis.
Common mistakes
- Carrying old SDXL CFG settings (7–9) into Flux — far too high, saturates badly.
- Treating CFG as a quality knob — it's a prompt-adherence knob.
FAQ
What is cfg scale (classifier-free guidance)?
CFG scale controls how strongly a diffusion image model follows its text prompt — higher values stick closer to the prompt, lower values explore more.
When should I use cfg scale (classifier-free guidance)?
Tuning prompt adherence vs. naturalness on a per-model basis.
What are the most common mistakes with cfg scale (classifier-free guidance)?
Carrying old SDXL CFG settings (7–9) into Flux — far too high, saturates badly. Treating CFG as a quality knob — it's a prompt-adherence knob.
Related terms
- Diffusion model — A diffusion model is a generative neural network that creates images, video, or audio by iteratively denoising random noise toward a learned target distribution.
- Seed — A seed is an integer that initializes the random number generator inside an image, video, or audio model, making generation reproducible.
- Negative prompt — A negative prompt is text that tells an image, video, or audio generator what to avoid producing — the opposite of the main prompt.
Last updated: 2026-06-01. Raw markdown: https://promtable.com/glossary/cfg-scale.md.