How It Works

CFG Scale

How the CFG scale impacts prompt adherence

Shawn @ Prompting Pixels

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.

Explore More

More How It Works Tutorials

Continue learning with more tutorials from the How It Works category.

View All How It Works Tutorials
Video Tutorial

Watch the full walkthrough

CFG Scale