Prompts are great at deciding WHAT is in an image and terrible at deciding WHERE. This chapter hands the model a picture instead of more adjectives β repaint it, patch one corner, or trace over its bones and redraw everything else.
Four chapters in, you can steer with words (the prompt), knobs (steps, guidance, seed), and patches (LoRA). There's a fourth steering wheel, and it's the one you reach for the moment you care about composition: hand the model a picture.
Three tools, escalating in how tightly they hold on: img2img repaints a whole image, inpainting repaints one region, and ControlNet keeps only the structure and redraws the rest. By the end you'll know exactly which wheel to grab for a given job.
Try to art-direct with adjectives: "a cat on the LEFT, a lighthouse in the BACK, sun in the top-right corner." Generate it a dozen times and the cat wanders, the lighthouse floats, the sun does whatever it likes. The model treats layout words as vibes, not coordinates.
Chapter 1 told you why. The text encoder turns your prompt into a bag of numbers β it captures what you asked for beautifully, but geometry mostly doesn't survive the trip. "Left", "behind", "top-right" arrive as faint suggestions, not a floor plan. Crank guidance and you don't get better placement; you get a more saturated version of the same misplacement.
So when you care about where, stop adding adjectives and add a second input channel: an image. Three tools, in order of how much of the source they keep:
Remember Chapter 1's loop β guess the noise, subtract a bit, repeat. Plain txt2img starts that loop from step 0: pure static, nothing but a seed. img2img starts it somewhere else. It takes your image, adds noise partway back β erasing some of it β and then runs the exact same denoise loop from that half-erased state.
One dial governs the whole thing: strength, i.e. how much of your image gets erased before the repaint begins.
Here's the quiet gotcha: img2img actually runs about strength Γ steps of the loop, not all of them β because it skipped the early ones by starting partway. So very low strength barely does anything by design. Drag the dial and watch the repaint zone shift:
Three recipes that make img2img worth a permanent slot in your workflow:
img2img repaints the whole frame. Often you only want to fix one corner β the classic broken hand, an ugly sky, a photobomber in the background. That's inpainting: you paint a mask over a region, and the loop runs as normal, except at every step only the masked pixels are allowed to change. Everything outside the mask is clamped back to the original, step after step. The rest of the picture comes out bit-identical.
Paint a mask below β drag across cells, or tap a preset β then hit Generate. Only the masked region is repainted; watch the unmasked pixels stay exactly put:
Two craft notes that separate clean inpaints from obvious ones:
Outpainting is the same trick pointed outward: extend the canvas past its edges, mask the new blank margin, and let the model continue the picture into it. Same clamp, same loop β you're just inpainting the outside. DiffusionBee ships img2img and inpainting built in; the buttons move between versions, so treat the exact UI loosely.
Here's the job img2img can't do. You want the exact pose and layout of a source image, but a completely different picture β new palette, new medium, new subject skin. Low strength keeps the structure but also keeps the old look; high strength changes the look but erases the structure right along with it. There's no strength value that keeps one and drops the other.
ControlNet splits them apart. Plain version first: it extracts just the bones of your source β the edges, or a stick-figure pose, or a near/far depth map β and pins the denoise loop to those bones, while the prompt and your LoRAs repaint everything else freely. It's tracing paper: your lines stay put, the drawing on top of them changes completely.
Pick a control type, a style, and a weight, and watch the same bones become three different drawings:
Now the one paragraph of machinery, since you've earned it. A ControlNet is a trained copy of the U-Net's encoder half that reads the control map and, on every denoise step, nudges the guess toward "β¦and match these bones." It's Chapter 1's loop with a chaperone whispering the structure at each step. Crucially, the model's original weights stay frozen β the ControlNet only adds. That's why ControlNets are separate downloads that compose with any prompt and any LoRA stack (Chapter 3): structure and style are independent add-ons you mix at will.
Different maps keep different amounts of the source. You pick the one that encodes only what you care about β everything it doesn't encode, the prompt gets to invent.
The rule of thumb: pick the map that keeps only what you care about. The less a map encodes, the more room the prompt has to work. OpenPose throws away everything but the skeleton β perfect when only the pose is sacred. Canny keeps every edge β perfect when the linework is the point, and a straitjacket when it isn't.
Two dials shape how hard the trace holds β and you met the logic behind both in Chapter 2.
And here's the payoff: ControlNet stacks with everything else in this book. Structure from the ControlNet + style from a LoRA (Ch.3) + consistency from Chapter 4's frozen recipe = the whole guide firing in a single generation. Structure, look, and reproducibility, each on its own dial.
All three tools are the same generate function under the hood. They only change two things: where the loop starts, and who's chaperoning it. txt2img starts from static with no chaperone; img2img starts from your half-erased image; ControlNet starts from static again but hands the loop a control map. Flip between the languages β the shape is identical.
You now have four ways to steer, and they don't compete β they answer different questions. The decision comes down to how much of a source you want to keep:
That's the last wheel. You started with pure static and a single seed, learned the knobs that shape it, the patches that bend it, a style that's genuinely yours β and now the pictures that place it. Words, knobs, patches, and pictures: you have every steering wheel the model offers. Go point it exactly where you want.