Intermediate9 min

Editing: Inpaint, Outpaint, and Generative Fill

Generation gives you a base, editing makes it usable. The three workhorse edits are inpainting (replace part of an image), outpainting (extend beyond its edges), and object removal. These live in Photoshop's Generative Fill, in Flux Fill, and in every major web editor. This lesson teaches the technique that makes them work.

Step 1: Inpaint with a tight mask and a small prompt

Inpainting replaces whatever you mask. The two mistakes are masking too large an area and writing too big a prompt. Mask just the region and describe only what should be there. To remove an object, mask it and prompt the background that should fill the gap.

Generative fill — remove a sign
Image: a street with an ugly sign on the wall
1. Lasso the sign -> [ mask shown in red ]
2. Prompt: (empty) or weathered brick wall
3. Generate -> 3 variations of the patched wall
Mask the unwanted sign, leave the prompt empty or write brick wall, and the editor reconstructs the wall behind it.

Step 2: Outpaint to reframe

Outpainting extends the canvas. Use it to turn a square into a wide banner, or to give a tightly cropped subject some breathing room. Drag the canvas larger, then let the model invent what continues the scene.

Step 3: Composite when generation cannot get there

Sometimes the cleanest path is old fashioned. Generate elements separately, then composite them in a layered editor with masks and blending. AI removes the boring parts (cutting out, matching light) but you keep the control. Tools like Photoshop and the open source Krita with its AI plugin do this well.

Match the noise
When you paste a generated element onto a photo, add matching grain and a slight color grade across the whole composite. Mismatched noise is the number one giveaway of a fake.

Result

Take one of your earlier images, remove a distracting object with inpainting, extend it to a wide banner with outpainting, and confirm the result looks like a single seamless photo.

Hands-on tasks