What is classifier-free guidance (CFG) in diffusion?
hardAnswer
- Train the model to accept both conditional (c) and unconditional (∅, e.g., empty prompt) inputs, by dropping the condition 10-20% of the time.
- At sampling, form the guided prediction _θ. w>1 amplifies condition alignment (sharper prompt adherence) at some diversity cost.
- Standard trick in Stable Diffusion / Imagen — biggest single quality lever after model size.
Check yourself — multiple choice
- CFG requires a classifier
- Train with occasional empty conditioning; at sampling, extrapolate: · → stronger prompt alignment
- Removes conditioning
- Same as DDIM
CFG: extrapolation between cond/uncond predictions — huge quality boost for text-to-image.
#diffusion#generative
Practise Deep Learning
214 interview questions in this topic.
Related questions
- Describe the forward and reverse processes in diffusion models.
- How does DDIM speed up diffusion sampling?
- How does Latent Diffusion (Stable Diffusion) reduce compute?
- What is InstanceNorm and where does it shine?
- What is a transposed convolution ('deconv') and its checkerboard artifact issue?
- What is the standard reconstruction loss for autoencoders?