Inpainting replaces a marked area of an image with newly generated content. The operation is less local than it appears, and the ways it leaks explain most of the frustration with it.

What happens inside the mask

The masked region is regenerated from noise, conditioned on the surrounding pixels and on the prompt supplied for the edit.

The surroundings matter enormously, since the model uses them to infer lighting direction, colour temperature, focus and material.

This is why an inpaint with no prompt still produces something coherent: the context alone specifies most of what belongs there.

Why the mask edge is the difficult part

The generated region must meet the untouched pixels exactly, and any discontinuity in tone or texture reads as a seam.

Feathering the mask blends the transition and softens detail near the boundary, which is a trade rather than a fix.

Masks that follow an object's outline precisely tend to produce worse results than slightly larger, looser masks, because the model needs room to resolve the join.

How the prompt applies to a region

A prompt written for an inpaint applies to the masked area, not to the picture, which is the most common source of confusion.

Describing the whole scene when only a hand is masked pushes the model to fit the entire description into that small region.

The instruction should describe what belongs in the masked area specifically, with just enough context to place it correctly.

Why repeated edits degrade the image

Each inpaint recompresses and regenerates part of the image, and successive passes accumulate softness, colour drift and texture inconsistency.

Regions edited several times develop a subtly different character from untouched areas, visible as a change in grain or sharpness.

Working at the highest available resolution and keeping the number of passes low limits this, and returning to a fresh generation is often faster than a fourth correction.

Where inpainting outperforms regeneration

When most of an image is right, regenerating everything to fix one element discards work that a seed change will not reliably recover.

Removing an unwanted object, correcting a specific hand, extending a background to a new aspect ratio and altering one item of clothing are all cases where the surrounding image is the point.

The judgement is simply whether the parts you want to keep would survive a new generation, and if the answer is no, the edit is worth its artefacts.