Modern image generation is dominated by diffusion models.
The process starts from random noise and denoises repeatedly into a picture.
Doing that at full resolution is enormously expensive.
Latent diffusion runs it in a compressed space instead, perhaps 64 by 64.
A VAE encodes to that space and decodes once at the end.
That single change is what put image generation on consumer hardware.
The prompt is turned into vectors by a text encoder, usually CLIP-derived.
Cross-attention injects that signal at every denoising step, so the prompt steers throughout.
The denoising network is typically a U-Net, though transformers are now common.
The number of steps trades quality for speed, with twenty to fifty being usual.
Guidance scale controls how strictly the prompt is followed.
Low guidance drifts off-prompt, and high guidance produces rigid over-saturated images.
The seed fixes the starting noise, so the same seed and prompt reproduce the image.
ControlNet and similar tools add structural conditioning such as a pose or an outline.
Fine-tuning methods like LoRA and DreamBooth teach a specific style or subject cheaply.