Skip to content

    Inpainting

    Web design & developmentImage Inpainting
    Reading time: 3 min.Editorially reviewed on:
    ← All terms

    Definition

    Inpainting fills masked image areas with new content, for example to replace damaged parts or exchange unwanted content.

    According to Rombach et al., inpainting is the task of filling masked image areas with new content. The Diffusers documentation describes the mask as follows: White pixels mark the area to be filled, black pixels the area to be preserved; the white pixels are filled based on a prompt. Lugmayr et al. use diffusion models (DDPM) for inpainting.

    Simply explained

    You mark a spot in the image to be filled with new content; depending on the model, the surrounding area may also change.

    Why it matters in practice

    Relevant when individual image areas are to be removed, repaired, or replaced without regenerating the entire image.

    Example from business

    Possible example: A team replaces an annoying background area in a shared subject.

    Limits and pitfalls

    • Assuming that the area outside the mask remains unchanged, although inpainting-specific checkpoints tend to alter it according to Diffusers; overlooking visible mask contours with non-specialized checkpoints; overlooking misleading image manipulation.

    Origin & history

    Bertalmio, Sapiro, Caselles, and Ballester published "Image inpainting" in 2000. Later works such as Latent Diffusion Models (2021) and RePaint (2022) used diffusion models. This development is to be distinguished from older image retouching.

    Use in mid-sized companies

    • Possible application areas: removing disturbing objects or image defects in product photos; replacing individual image areas for variants of a motif; preserving mask image and prompt for traceability of editing.

    Frequently asked questions

    How can the area outside the mask be preserved?

    Diffusers offers apply_overlay() for this, which leaves it unchanged but with sometimes less natural transitions.

    How can the transitions to the original image be softened?

    Diffusers describes mask blur for this purpose: A higher blur_factor softens the mask edges.

    What is Free-Form Inpainting?

    According to Lugmayr et al., it is the addition of new content in image areas defined by an arbitrary binary mask.

    Sources

    Sources checked on 14.10.2026. Editorial application examples are hypothetical; no evidence of real customer results.

    Editorially reviewed on:

    On this page

    Next step

    Put knowledge into practice