A conditional diffusion model can follow its conditioning signal more strongly at sampling time without a separate classifier. Classifier-free guidance does this by evaluating a model in conditional and unconditional modes, then amplifying the difference between those predictions.

That difference is the central mechanism. The guidance scale does not simply make a prompt louder in an abstract sense. It changes the denoising prediction along a direction defined by what the conditioning input contributes relative to an unconditional prediction at the same noisy state.

Guidance is an extrapolation between predictions

Assume a diffusion model produces a noise prediction eps_cond when given condition c, and eps_uncond when the condition is omitted. A common classifier-free guidance form is:

eps_guided = eps_uncond + s * (eps_cond - eps_uncond)

Here, s is the guidance scale. At s = 0, the expression gives the unconditional prediction. At s = 1, it gives the ordinary conditional prediction. Values above one extrapolate past the conditional prediction in the direction from unconditional to conditional output.

An equivalent parameterization sometimes appears as:

eps_guided = (1 + w) * eps_cond - w * eps_uncond

The two forms use different scale conventions: s = 1 + w. A numeric guidance value therefore has meaning only together with the convention used by the implementation.

The same idea can be expressed for score predictions or other diffusion parameterizations, but conversion details depend on the model and sampler. Code should not assume that a formula written for epsilon prediction can be copied unchanged into every prediction parameterization.

The unconditional branch supplies a local reference

The unconditional output is evaluated at the same noisy sample and diffusion time as the conditional output. It therefore acts as a local reference for the model’s denoising behavior without the supplied condition.

Subtracting the two predictions isolates a direction associated with the conditioning signal:

delta = eps_cond - eps_uncond

Classifier-free guidance scales this delta before adding it back to the unconditional prediction. The operation does not identify a clean semantic vector that stays constant across sampling. Both predictions depend on the current noisy state and diffusion time, so the direction can change at every denoising evaluation.

This detail matters for implementation. Caching one conditional-minus-unconditional difference and reusing it across timesteps would change the mechanism. Each guided prediction is tied to the current model input.

Conditional dropout makes both branches available

Classifier-free guidance requires a model that can produce useful conditional and unconditional predictions. In the original formulation, this capability is obtained by jointly training conditional and unconditional behavior, commonly by dropping the conditioning input for a fraction of training examples.

The model then sees examples with the condition present and examples with it absent. At inference, the same model parameters can be evaluated in both modes. This removes the separate noisy-image classifier required by classifier guidance, but it does not remove the need for an unconditional path in the generative model.

The representation of an absent condition is model-specific. It may be a null class, an empty conditioning representation, a dedicated embedding, or another mechanism defined during training. Replacing that representation at inference with an arbitrary value is not guaranteed to reproduce the unconditional behavior established during training.

Larger scales alter more than prompt adherence

For s > 1, classifier-free guidance extrapolates beyond the model’s direct conditional prediction. Increasing the scale increases the magnitude of the conditioning difference unless that difference is zero. This can strengthen the influence of the condition, but it also moves the prediction farther from the model output used in ordinary conditional sampling.

The original classifier-free guidance work presents this control as a trade between sample fidelity and diversity. A larger scale should not be treated as a monotonic quality control. The useful range depends on the trained model, its conditioning representation, the sampler, and the evaluation target.

There is also no general rule that a scale used for one checkpoint transfers cleanly to another. Two models can produce conditional and unconditional differences with different magnitudes and geometry. Even when their user-facing scale fields have the same name, equal numeric values need not represent equal effective conditioning strength.

Two model evaluations affect inference cost

The direct form of classifier-free guidance needs both conditional and unconditional predictions for each guided denoising evaluation. Conceptually, that is two model evaluations instead of one conditional evaluation.

Implementations often concatenate the unconditional and conditional inputs into a larger batch and process them in one model call. That changes scheduling and hardware utilization, but it does not remove the underlying requirement to compute both branches. Memory use and latency depend on the model architecture, batch layout, device, kernels, and sampler, so a fixed cost multiplier is not a portable guarantee.

This distinction becomes relevant in serving systems. A configuration that exposes guidance scale as a cheap scalar knob may hide a substantial change in model work when guidance is enabled. Capacity planning should account for the actual execution path rather than only the number of sampler iterations.

Negative conditioning changes the reference branch

Some diffusion systems expose a negative condition and use it in the branch commonly called unconditional. In that case, the reference prediction is no longer strictly unconditional. The guidance expression can still have the same algebraic shape:

eps_guided = eps_ref + s * (eps_cond - eps_ref)

but eps_ref now represents the model prediction under the negative or reference condition. The scaled direction is consequently the difference between two conditioned predictions.

This makes terminology significant when reading an implementation. A variable named uncond does not prove that the branch received no semantic condition. Inspecting how the reference embedding is constructed is necessary before attributing unconditional semantics to it.

Guidance scale belongs to the sampling configuration

Classifier-free guidance changes inference behavior without changing the stored model weights, which makes the scale easy to expose as a runtime parameter. That convenience can also encourage treating it as independent from the rest of the sampling setup.

It is more precise to regard guidance scale as part of a complete inference configuration. Prediction parameterization, reference-condition construction, sampler equations, timestep schedule, and any guidance rescaling or clipping can affect the result. An evaluation that varies guidance while silently changing another one of these components cannot isolate the effect of the scale itself.

For developers, the useful invariant is the algebraic role of the two branches: obtain a prediction with the target condition, obtain the matching reference prediction at the same state, form their difference, and scale that difference according to the implementation’s convention. Everything around that operation should be checked against the specific model and sampler rather than inferred from the parameter name alone.