What Generative Fill Actually Does
Generative fill — technically called inpainting — lets you change one region of an image while everything else stays pixel-identical. It is the single most useful AI editing technique because it turns "regenerate and hope" into targeted, surgical editing.
Under the hood, the AI looks at the surrounding context (lighting direction, perspective, color grading, grain) and synthesizes new content for the area you describe that matches all of it. Done well, the seam is invisible. ChatGPT and Gemini both handle this conversationally: attach the photo, describe exactly what should change and what must stay the same, and the edit comes back in seconds.
The Five Highest-Value Use Cases
1. Object replacement — "replace the lamp with a tall potted monstera plant," and the room is redecorated. Real-estate and interior mockups live on this.
2. Wardrobe edits — "change the t-shirt to a navy blue tailored blazer." Fit and lighting carry over from the original photo, which is why this beats regenerating the whole portrait.
3. Defect repair — stains, cracks, photobombers, lens flares. For pure removal, just say so: "remove the person in the background and fill in the wall behind them."
4. Product staging — "place this product on a white marble countertop with soft window light" restages a shoot without a studio.
5. Sky and weather swaps — "replace the sky with dramatic storm clouds at golden hour." The classic landscape rescue.
Precision Matters More Than Prompt Length
In our testing, how precisely you describe the edit affects results more than how much you write. Three rules:
Describe the region generously. If you say "change the mug," the AI may edit only the mug's visible pixels and leave ghost edges. Say "replace the mug and the small area immediately around it" so the boundary blends.
Mention contact shadows. If you remove a chair but say nothing about its shadow, the AI receives contradictory evidence ("there is a shadow of nothing") and often paints a new object to explain it. Add "including its shadow" to removals.
Match your description to the new object's size, not the old one's. Replacing a mug with a vase? Say "a tall vase," or the AI may squeeze a mug-sized vase into the gap.
Prompting the Edit
Prompts for edits behave differently from full-image prompts:
Describe only what changes. The AI already sees the context — repeating "in a cozy living room" wastes words and can cause a picture-in-picture effect where a tiny scene gets painted inside your edit region.
State materials and lighting only when you want to override. "Brushed brass table lamp" is enough; the AI will light it from the window it can see. Add "warm glowing bulb" only if the lamp should be on.
Iterate on the instruction, then re-roll. If a result is almost right, regenerate with the same prompt first — edits are stochastic and the second roll is often the winner. Rephrase only when results are consistently wrong in the same way.
When you need to extend the canvas rather than edit inside it, that is outpainting — covered in our image expansion guide.