What You'll Learn
Learn how the CFG (Classifier-Free Guidance) scale controls how closely your AI-generated images match your text prompts. This tutorial explains the balance between creative interpretation and strict prompt adherence, helping you choose the right CFG values for different models like Stable Diffusion 1.5, SDXL, and faster variants like SDXL Turbo. You'll understand when to use lower values for artistic freedom versus higher values for accurate results.
Video Walkthrough
Prefer watching to reading? Follow along with a step-by-step video guide.
CFG Scale
The CFG (Classifier-Free Guidance) scale controls how closely the generated image follows your text prompt.
It allows you to balance creativity and accuracy in your output.
The CFG scale ranges from 1 to 30, with lower values allowing more creative interpretation and higher values making the image match your prompt more strictly.
For most purposes, a CFG scale of 7-8 works well, providing a good balance between following the prompt and allowing some artistic freedom. This is especially true for Stable Diffusion 1.5, 2.1, and XL models.
If you are using SDXL Turbo, SDXL Lightning, or an LCM model, then a lower CFG value of 1-2 will result in better outputs.
Broadly speaking, a CFG value greater than 10 for most models will oversaturate the image with elements from the prompt, potentially leading to a less artistic or unique result.
Want More AI Image Tutorials?
Get the best AI image tutorials and tool reviews—no spam, just 1 or 2 helpful emails a month.
Continue Learning
More How It Works Tutorials
Explore additional tutorials in the How It Works category.
View All Tutorials