Inpainting

Filling, repairing, replacing, or extending missing and masked parts of an image or other media so they match the surrounding context.

Which tile belongs in the damaged corner?

A fictional four-by-four decorative panel has lost its bottom-right tile. The two proposed completions below are hand-built illustrations of the inference problem.

Repeat the pattern

Continuing the checkerboard puts an ivory tile in the corner. This choice follows the local repetition.

Give the corner an accent

An amber corner medallion fits the same available space. It could reflect a designer’s decision that neighboring tiles cannot establish.

Known tiles
?
Repeat
Accent
◆

The dashed cell is the same masked location in all three diagrams. Both proposed fills leave the fifteen observed tiles intact.

What can an inpainted image claim?

The surrounding image constrains a completion. It does not prove what formerly occupied the mask. In a collection record, keep the original, the mask and any proposed reconstruction distinct. A historical photograph of the intact panel would supply different evidence.

How It Works

Traditional inpainting methods relied on copying nearby pixels or textures into a gap. Modern AI inpainting goes further by using learned visual structure, semantic context, and prompt guidance to predict what belongs inside the selected region. That is why current tools can do more than hide scratches or remove an object. They can add a new one, replace background content, or extend the boundaries of an image in a way that remains visually coherent.

In practice, inpainting often sits inside a larger editing workflow. A person selects a region, supplies a prompt or reference image, and reviews several possible completions. The final result still depends on human judgment, because even strong inpainting models can misread intent or introduce convincing but unwanted detail.

Follow the idea

Diffusion models can generate replacement content conditioned on the visible area.

Provenance distinguishes observed pixels from later reconstruction.

Related concepts (6)

Examples in the AI guides

Related Yenra articles (3)

Source · Rombach and colleagues on latent diffusion and image inpainting

Return to Inpainting in the A–Z glossary