AI GLOSSARY · AI CONCEPTS

Inpainting

Markdown version · Wikidata Q117021514

Definition

Inpainting is an image-editing technique in which you mask a region of an image and a generative model fills only that region, usually guided by a text prompt, while the rest of the image is meant to stay unchanged.

Also called: AI inpainting, image inpainting, inpaint, generative fill, AI image editing, masked image editing.

In plain language

Inpainting is a way to repair or change part of a picture without redoing the whole thing. You paint over the area you want changed, for example a stray bin in a holiday photo, and describe what should be there instead, or leave it to blend with the surroundings. The AI then redraws only that patch. It is like asking a restorer to retouch one corner of a painting. The result can still look wrong: edges may show, details may not match, and the tool may alter pixels outside your mask. Edited images can also carry rights and consent issues, particularly if they show real people or someone else's work.

Technical definition

Inpainting takes a base image, a mask and usually a text prompt. In the Hugging Face Diffusers guide, white mask pixels mark the area to fill and black pixels the area to keep. A diffusion model, often a latent diffusion model, denoises the masked region conditioned on the prompt and the visible pixels. The Diffusers guide notes that checkpoints trained for inpainting tend to blend better but are more likely to change the unmasked area, and that an overlay step can force the unmasked pixels to stay unchanged. The latent diffusion paper (Rombach et al.) reports inpainting as one of the tasks its method was applied to.

Worked examples in this catalogue

Catalogue examples point at a skill, guide or coding tool listed on this site, with what to run and what you see. An example marked illustrative describes the item from its own documentation; it was not executed for this page. Platform Scores are our assessment under a published method, not a safety guarantee.

  1. Skill by OpenAI · Illustrative, not executed

    Image generation and editing skill 29/100 · Provisional, not yet measuredScored · Method v0.2 · How we score

    What you see
    A skill that generates or edits raster images such as mockups, textures and illustrations.
    Why it exercises the concept
    Editing an existing raster image is the same kind of job as inpainting. The catalogue entry does not say it uses masks, so treat it as adjacent, not as an inpainting tool.
  2. Skill by Skill Almanac · Illustrative, not executed

    image-prompt-direction 61/100 · grade CScored · Method v0.2 · How we score

    What you see
    Image prompts written like an art director's brief, then linted for gaps, contradictions and rights problems.
    Why it exercises the concept
    An inpainting prompt describes the masked patch, and vague or conflicting wording is a common reason a fill looks wrong. This skill is adjacent: it checks prompts, it does not edit images.
  3. Skill by Skill Almanac · Illustrative, not executed

    image-spec-check 57/100 · Provisional, not yet measuredScored · Method v0.2 · How we score

    What you see
    Exported images checked against your own spec table, with a statement of what to resize, crop, re-export or replace.
    Why it exercises the concept
    After an edit you still have to check that the file meets its size and format requirements. This is a downstream check, not part of inpainting itself.

How it shows up when you use agents

Inpainting is an image-editing feature, not an agent feature, but it turns up when an agent or a coding tool produces visual assets. A coding agent that calls an image tool to make a mockup or an illustration may be asked to fix one part of the result, and the right request is an edit of that part, not a fresh generation. A fresh generation can change parts you meant to keep.

The practical steps are simple. Decide the region, make a mask that covers it with a little margin, and write a prompt that describes what belongs inside the mask. A negative prompt can steer the model away from unwanted content. The model underneath is usually a diffusion model, the same family used for text-to-image generation.

What breaks when it is misunderstood: people assume the unmasked area is guaranteed to be untouched. The Diffusers documentation says inpainting-specific checkpoints are more likely to change it, and describes an overlay method to force it to stay the same, at the cost of less natural transitions. So compare the edit with the original before you use it. If the image will be published, also check rights and whether the edit could mislead viewers. Your next action: keep the original file, save the mask next to it, and note which tool and settings produced the edit so you can repeat or undo it.

Common confusions

  • Inpainting versus image-to-image. Image-to-image makes a new image that resembles a given one. According to the Diffusers guide, inpainting does the same but transforms only the masked area.
  • Inpainting versus outpainting. Inpainting fills a region inside the image. Outpainting extends an image beyond its borders. This page defines inpainting.
  • Inpainting versus text-to-image. Text-to-image starts from a prompt alone. Inpainting starts from an existing image and a mask.
  • Myth. The mask is a hard guarantee. It marks where the model should fill, but blending and the choice of model can still alter nearby pixels.

Terms that mention Inpainting

5 terms mention this one

More in AI concepts

Next steps

  1. Image generation and editing skill A skill that exercises it.
  2. Text-to-image Related term.
  3. Diffusion model Related term.
  4. All glossary terms A to Z and by family.

Sources

Definitions are written by Skill Almanac from these sources and were checked against them on 2026-11-24. Wikipedia is never the only source.

Review record

Last verified

Drafted by claude-sonnet-5-5; sources and example targets checked by claude-haiku-5-5 source check; claude-sonnet-5-5 editor pass on 2026-11-24. Last verified .

This entry is still in review, so it is not listed in search engines yet.

Change log (2)
  • : First version.
  • : Verifier pass: softened overstatement.