A diffusion model is conditioned on a text prompt by injecting CLIP text embeddings at multiple layers of the U-Net denoiser. Which mechanism directly uses those embeddings to steer the spatial features of the latent during denoising?
- ACross-attention layers in the U-Net, where queries come from the spatial feature map and keys and values come from the projected text embeddings Correct
- BSelf-attention within the U-Net residual blocks, which relates every spatial position to every other spatial position in the same layer
- CClassifier-free guidance, which blends two separate forward passes through the denoiser at inference time to amplify prompt alignment
- DAdaptive layer normalisation, which modulates feature statistics using a global pooled representation of the text embedding
Why A is correct: Cross-attention is the standard conditioning mechanism in latent diffusion models: spatial queries attend to token-level keys and values derived from the text embedding, allowing every spatial region to be guided by the relevant textual context.
Why B is wrong: Self-attention relates spatial positions to each other within the feature map, not to an external conditioning signal such as a text embedding, so it cannot directly inject the CLIP representation.
Why C is wrong: Classifier-free guidance is a sampling-time weighting strategy that scales the difference between conditional and unconditional predictions; it relies on cross-attention conditioning already being present and is not itself the mechanism that injects the embeddings.
Why D is wrong: Adaptive layer normalisation is used in some architectures such as DiT to inject timestep or class conditioning via scale and shift parameters, but it is not the primary mechanism used to inject token-level CLIP text embeddings in the U-Net backbone.