How does image generation work with diffusion models?
Diffusion models learn to reverse a noising process. In training, you take real images and progressively add Gaussian noise until they're pure noise, and train a network to predict and remove that noise step by step. To generate, you start from random noise and run the learned denoiser repeatedly, each step nudging the sample toward a realistic image. For text-to-image, the denoiser is conditioned on a text embedding (e.g. from CLIP or a text encoder) so the result matches the prompt. Latent diffusion (Stable Diffusion) does this in a compressed latent space instead of raw pixels, which is far cheaper. Trade-offs: quality is excellent but sampling is many-step and slow, controllability of precise prompt details is imperfect, and there's a quality-versus-diversity tension you tune via guidance strength.