TECHNOLOGY

Classifier-free guidance combines conditional and unconditional predictions

In this article
THE QUICK TAKE

Guidance changes the reverse-process prediction through a conditional-unconditional contrast; its scale convention and sampler parameterization must be explicit.

Classifier-free guidance uses a model that can produce predictions with and without a conditioning signal. A sampler combines those predictions to strengthen a condition-related direction. The operation is numerical and depends on conventions; calling its scale prompt strength hides important details about what is actually combined and what can change in the resulting samples.

Training makes conditioned and unconditioned predictions available

A classifier-free setup can train a denoising model with conditioning omitted on selected examples, enabling a common model to support both modes under its recipe. The unconditioned path is not necessarily an empty tensor inserted arbitrarily into any pretrained network. The expected null conditioning and data transformation belong to the model. This distinguishes classifier-free guidance from a separate external classifier that supplies a gradient. The method’s name identifies a mechanism, not a promise that conditioning has no additional execution cost.

The contrast provides a guidance direction

A useful description takes the conditional prediction and adds a scaled difference between conditional and unconditional predictions. The exact mathematical quantity may be a noise or score-related prediction under the sampler’s contract. Some interfaces instead express the same family as an unconditional baseline plus a scaled contrast, so their numerical scale conventions differ. State the formula before comparing settings. A value named guidance_scale cannot be interpreted reliably from its number alone when two implementations place the baseline differently.

Stronger contrast changes the sampled distribution

Increasing the contrast can favor features associated with the conditioning while changing diversity and other sample properties. It does not verify every requested relationship, count or textual detail. Imagine a prompt describing a specific arrangement of objects: stronger guidance can emphasize recognizable objects without necessarily fixing the arrangement. This is a hypothetical failure mode to test, not a universal measured result. Quality and alignment are separate evaluation dimensions, and an appealing sample does not establish that the conditioning was followed in every substantive respect.

Keep parameterization and evaluation together

Compare guidance under a fixed checkpoint, noise schedule, sampler, seed policy and conditioning construction. Verify a tiny numerical fixture for the combination before inspecting generated outputs. Record null conditioning and any implementation-specific rescaling. The original classifier-free formulation is a research mechanism, while a production interface may add its own conventions. This makes guidance understandable as a controlled change to the reverse prediction and prevents a single scale slider from being presented as a universal control over truth, safety or visual correctness.

Primary research and implementation references

Reproducible inference stacks: preserving a GPU pilot’s result; A GPU inference benchmark you can trust.

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles