Guidance scale (CFG)
The guidance scale, or CFG scale, is a setting in diffusion image generators that controls how strongly the output follows the prompt. Higher values follow the prompt more closely but reduce variety.
Also called: classifier-free guidance, CFG, CFG scale, guidance
By Divya Sharma · Checked Nov 15, 2026 · How we review
CFG stands for classifier-free guidance, the technique the setting controls. Most image tools expose it as a number, often called CFG scale or guidance. Turn it up and images match the prompt more literally; turn it down and the model wanders more, giving varied and sometimes more natural results.
How it works
Jonathan Ho and Tim Salimans described classifier-free guidance in 2022. One diffusion model is trained to denoise both with the prompt and without it, by sometimes dropping the prompt during training. At each generation step it makes both predictions, and the guidance scale sets how far to push away from the unprompted one toward the prompted one. Because each step needs two predictions, guidance roughly doubles the work per step unless the model is distilled to avoid it.
Choosing a value
There is no universal best number. Each model has a range its makers recommend, and some newer distilled models are built to run with guidance turned off or fixed. Too high a value often gives oversaturated colours, harsh contrast and artefacts. It works with the other sampling settings, such as the number of steps and the seed.
How it differs from temperature
The original paper compares guidance to low temperature sampling in other generative models: both trade variety for quality. Temperature reshapes the probabilities of the next token in a language model; guidance changes the direction of each denoising step in an image model.
Related terms
- Diffusion model
- A diffusion model is a generative model that learns to turn random noise into data, such as an image, by removing a little noise at a time over many steps.
- Text-to-image
- Text-to-image is the task of generating a new picture from a written description, called a prompt. Most current text-to-image models are diffusion models conditioned on the text.
- Temperature (sampling)
- Temperature is a sampling setting that controls how random a language model's word choices are. Low values make it favour the most likely tokens; higher values spread choices across less likely ones.
- ControlNet
- ControlNet is a neural network add-on that lets a text-to-image diffusion model follow a structural guide, such as an edge map, depth map or human pose, in addition to the text prompt.
- Image-to-image
- Image-to-image is the task of generating a new image from an existing one plus a prompt, keeping some of the original's structure while changing style, detail or content.