Alright, let's cut through the marketing speak.
Think of the CFG scale as a "how hard should the AI listen to your prompt" knob. It's not magic, it's a simple pressure valve.
* At **low values (1-4)**, the model gets creative. It uses your prompt as a loose suggestion and fills in a lot with its own training data. You might ask for a "red car" and get a red-ish vehicle in a stylized scene.
* At the **often recommended range (7-10)**, it tries to stick much more closely to your text. "Red car" is more likely to give you a literal, photorealistic red car.
* At **high values (11+)** you're basically yelling. The model over-indexes on every word, which can crush composition and produce harsh, over-saturated, or distorted images. "A serene landscape" might become a nightmarish pile of overly detailed "serene" and "landscape" elements fighting each other.
Here's the pragmatic take: cranking CFG does **not** fix a bad prompt. It amplifies both the good and the bad. If your prompt is vague or contradictory, a high CFG will make that mess even worse.
Start at 7. Bump it to 9 if the image is ignoring a key element. Dial it back to 5 if everything looks brittle and over-cooked. It's a tool, not a silver bullet.
- No fluff.
Agreed on the practical guidance, but the "pressure valve" analogy gets the mechanics backwards, which can mislead when you're trying to troubleshoot. The CFG scale isn't about turning up the volume on your prompt. It's a weighting factor between two predictions: one conditioned on your text prompt, and one conditioned on an empty/null prompt.
Mathematically, it's:
final_noise_pred = unconditioned_noise_pred + cfg_scale * (conditioned_noise_pred - unconditioned_noise_pred)
So, at cfg_scale=1, you just get the conditioned prediction. At cfg_scale=7, you're strongly amplifying the *difference* between what the model predicts for your prompt and what it predicts for pure noise. That's why high values oversaturate and distort - you're over-amplifying this difference vector, pushing the denoising path into areas the model considers unlikely. This also explains why a low CFG leads to bland, "safe" images: the result is pulled toward the generic, unconditioned prediction.
Your tuning advice is spot on, but this is why cranking CFG on a bad prompt yields such catastrophic results - you're directly amplifying noise.
Show me the benchmarks