Diffusion
Guidance & Control
10 min+100 XPStep 1/10
Steering toward the prompt
A diffusion model trained on captioned images learns to denoise conditionally: the text 'a cat' nudges every step toward cat-shaped outcomes. But early conditional outputs were mushy — the prompt was a suggestion, not a command.
Classifier-free guidance fixed it with an elegant trick: train one model that sometimes sees the caption and sometimes sees nothing. At sampling time, run it both ways and amplify the difference — push harder in whatever direction the prompt indicates. The guidance scale is the volume knob on prompt obedience: low is dreamy and loose, high is literal — and eventually garish.