AI Glossary · technique

What is Inpainting?

Definition
Inpainting uses AI to regenerate a selected region of an image while keeping the rest untouched. You mark the area to change (by drawing over it), provide a text prompt describing what should go there, and the model fills in that region only — matching the original image's lighting, perspective, and style.

Inpainting transformed AI image generation from a 'roll the dice' tool into a usable editing workflow. Instead of regenerating a whole image to fix one wrong hand, you mask the hand and let the model re-render just that region with context from the rest of the image.

Modern inpainting goes beyond simple fixes: remove unwanted objects, swap clothing, change backgrounds, fix facial expressions, or extend images beyond their original borders (a variant called outpainting).

How it works

Mask the region

Draw a mask over the area you want to change. Tools like brush, lasso, or automatic detection (for objects or faces) all work.

Conditional re-generation

The diffusion model generates new content for the masked region while conditioning on the surrounding unmasked pixels. This preserves lighting, color, and perspective continuity.

Common use cases

  • Removing unwanted objects (photobombers, watermarks, distracting elements)
  • Fixing AI generation failures (deformed hands, extra fingers, weird faces)
  • Swapping outfits, accessories, or backgrounds in product photography
  • Retouching old photos to remove scratches or damage
  • Extending images beyond their borders (outpainting)

Frequently asked questions

Does Oakgen support inpainting?
Yes — it's available as a feature under the image editor. Upload an image, paint over the area to change, and describe what should go there.
What's the difference between inpainting and outpainting?
Inpainting fills in a masked region inside the original image. Outpainting extends the image beyond its original borders — the 'mask' is outside the existing frame.

Related terms

What is Inpainting? AI Image Editing Explained | Oakgen | Oakgen.ai