Generative AI / Modalities & Control
Steering and refining generated output.
Reviewed by Yuvaraj
A raw diffusion sample is a roll of the dice: you give a prompt, the model starts from random noise, and you get something in the neighborhood of what you asked for. Controllability is the set of levers that move you from "in the neighborhood" to "exactly this," and editing reuses the very same machinery to change part of an image you already have instead of generating from scratch. Both come down to one idea, feeding the denoiser extra information that constrains what it is allowed to produce.
Recall that a diffusion model removes noise one step at a time by predicting the noise in the current image. That prediction is a function not just of the noisy image but of a condition, the extra signal you supply. Change the condition and you change every step of the denoising trajectory. Different modalities of condition give you different kinds of control:
| Condition | Mechanism | What it controls |
|---|---|---|
| Text prompt | Cross-attention to text embeddings | Subject, style, mood |
| Init image (img2img) | Start from a partially-noised image | Overall composition and color |
| Mask (inpainting) | Freeze pixels outside the mask | Which region gets regenerated |
| Structure (ControlNet) | Extra network reads edges/depth/pose | Layout, geometry, pose |
The single most important knob is classifier-free guidance (CFG). It amplifies how strongly the prompt pulls on the result.
Ask about this lesson, or about anything in AI. Answers cite the lessons they draw on.
Finished this lesson?
Mark it complete to earn XP, keep your streak, and schedule a review.
For a curious beginner
How it is actually used
The underlying mechanism
Suppose at one step the model predicts an unconditioned noise value of for some pixel and a conditioned value of . The prompt wants to push that pixel by .
That larger correction, applied at every step across every pixel, is why a higher scale produces an image that adheres far more tightly to the text, and why pushing too high overshoots into artifacts.
A negative prompt simply replaces the empty unconditioned branch with a real description of what you do not want (blurry, extra fingers, watermark), so guidance actively pushes away from it. The seed fixes the initial random noise: reuse the same seed, prompt, and settings and you get a bit-for-bit identical image, essential for reproducibility and for changing one variable at a time.
The denoising strength in image-to-image is the key editing dial: a value near 0.2 nudges the picture, while 0.8 reimagines it and preserves little more than the composition.
Common mistakes