What Is Inpainting? AI Image Editing Explained

Inpainting is an image editing technique that regenerates a selected part of a picture while leaving the rest untouched. We explain how inpainting works, how it differs from outpainting and which AI inpainting tools you can try on SYNTX.AI.

Edit an image
What Is Inpainting? AI Image Editing Explained

What Is Inpainting? AI Image Editing Explained

Inpainting is an image editing technique that regenerates a selected part of a picture while leaving the rest untouched. With AI inpainting, you mark an area, describe what should appear there, and the model fills it in to match its surroundings. Below, we explain how inpainting works, how it differs from outpainting and which AI inpainting tools you can try on SYNTX.AI.

What is inpainting?

The term comes from art restoration, where conservators fill in cracks and missing patches of a painting with paint that matches the rest. In 2000, researchers borrowed the word for algorithms that fill holes in digital images using the pixels around them.

Image inpainting today means the same thing with a smarter engine. You give a model a picture, a mask that marks the area to change and, usually, a text prompt. The model regenerates only the masked area and blends it into the rest of the image. For example, mask a lamp on a table, write "a small potted plant," and the model replaces the lamp with a plant lit like the rest of the scene.

It works well because the model always has real pixels on every side of the hole, so it continues an existing scene instead of inventing a new one.

Typical uses of AI inpainting include:

  • Removing objects
  • Replacing objects
  • Repairing images
  • Changing backgrounds and clothing
  • Fixing misspelled text

What is video inpaiting?

Video inpainting applies the same method to a clip. You give a model a video, a mask that covers the area to change across the frames and, usually, a text prompt. The model regenerates the masked pixels in every frame and blends them back into the footage. For example, mask a car parked in the background of a shot, and the model removes it, filling in the road and the scenery behind it as the camera moves.

The biggest difference from image inpainting is time. A single frame only has to look right on its own, but consecutive frames also have to match with each other. Otherwise, the filled area will flicker, drift or change texture as the shot plays. To get that consistency, video models use the pixels around the selected area in the same frame, plus the frames before and after it. Many tools track the mask through the clip automatically.

How AI inpainting works

Most modern inpainting AI runs on diffusion models, the same family that generates images from text. The process has four steps.

  1. Masking. You mark the area to change. In most tools, the painted or white area is regenerated and the rest is kept, though OpenAI's API does the opposite and treats transparent pixels as the area to replace.
  2. Encoding. The image is compressed into a smaller representation, called a latent, so the model can work quickly. In Stable Diffusion, that representation is about eight times smaller on each side, and the mask shrinks with it. Hard edges can appear along the seam, which is why many tools blur or feather the mask.
  3. Denoising. The masked area starts as random noise. The model removes the noise step by step, guided by two things, the text prompt and the visible pixels around the hole. The prompt should describe what goes inside the mask, not the whole image.
  4. Blending. The new content is decoded back into pixels and merged with the original image along the mask edge.

There are two ways to teach a model to do this. A dedicated inpainting model is trained specifically for the task. Stable Diffusion's inpainting checkpoint, for instance, has a modified first layer that takes nine input channels instead of four, adding the masked image and the mask itself.

A general model can do inpainting too, with a trick that re-inserts a noised copy of the original, unmasked area at every step. That forces the new content to match its surroundings.

One limit is worth knowing. Inpainting can't recover what was really there, because it generates something plausible. A restored face or a filled-in background is an educated guess about the original.

Mask-based vs. mask-free editing

Newer AI models add a second way to edit, and it changes how inpainting feels in practice.

ApproachHow you editStrengthWatch out for
Mask-basedPaint over the area, then describe the fillExact control over which pixels changeNeeds a clean mask and some tuning
Selection plus promptHighlight an area in an editor, then describe the changeQuick and visualEdits can spill past the selection
Mask-freeDescribe the change in words onlyFastest, no tools neededThe model decides what to touch

In mask-free editing, you write something like "replace the jacket with a black leather bomber," and the model works out where the jacket is and redraws only that. Some recent models, such as Ideogram 4.5, are built to copy unchanged pixels from the original, which keeps the rest of the picture stable. The wording matters more here, because the model needs to know both what to change and what to keep.

Inpainting vs. outpainting

Inpainting changes content inside the existing frame. The image keeps its size and shape, and only the masked area is regenerated. Outpainting adds new content outside the frame, growing the picture into a wider or taller canvas.

InpaintingOutpainting
Where the mask isInside the imageOutside the borders
Image sizeStays the sameGets larger
Context availableReal pixels on every sideReal pixels on one side only
Typical useRemove, replace, repairExtend a background, change aspect ratio

Outpainting is a harder task, since the model has less to work from. Both use the same engine, so tools often bundle them. Adobe, for example, calls its version of inpainting Generative Fill and its outpainting Generative Expand.

Inpainting also differs from image-to-image generation. Image-to-image reworks the whole picture based on a strength setting, while inpainting limits the change to the mask.

A short history of image inpainting

  • 2000. Researchers introduced digital image inpainting, inspired by art conservators.
  • 2009 to 2010. Patch-based methods copied nearby textures to fill holes, like Photoshop's Content-Aware Fill in 2010. They could extend patterns but couldn't invent new objects.
  • 2016 to 2018. Neural networks, first context encoders and then GAN-based models, learned to generate missing content.
  • 2022. Diffusion models changed the field. DALL-E 2 introduced inpainting in its editor and later added outpainting, and Stable Diffusion followed with open-source inpainting.
  • 2023. Adobe added Generative Fill to Photoshop.
  • 2025 to 2026. Instruction-based models such as FLUX.1 Kontext, Nano Banana and GPT Image made masks optional, and video models began offering the same kind of edits on moving footage.

AI inpainting tools on SYNTX.AI

These tools on SYNTX.AI edit part of an image or video, and they differ in how you tell them what to change.

ToolHow you editGood forWorth knowing
Nano Banana 2.1Plain-language instruction, no maskSwapping outfits, objects and backgroundsRedraws only what you describe, and takes up to 14 reference images
GPT Image 2.5Instruction plus reference imagesMulti-step edits and text in imagesFlare is faster, and Sunburst gives the tightest control across repeated edits
Seedream 5 ProSelect an area, then describe the changeLocal edits and background changesCan split an image into up to 16 editable layers
Ideogram 4.5Instruction, with an optional mask and up to 4 referencesRestoring old photos and fixing textCopies untouched pixels from the original, and can edit or translate text
Kling 4.0Instruction on a finished videoAdding, replacing or removing objects and backgroundsAlso changes style, color and camera angle
Seedance 2.5 edit modeA video plus reference imagesSwapping an object or character in a clipKeeps the replacement consistent through the whole clip, matching the original motion and lighting

For any of them, say what should change and what must stay. A prompt such as "Replace only the white armchair on the right with a dark brown leather one. Keep the walls, floor, windows, lighting and camera angle unchanged" gives the model a clear boundary.

Tips for better inpainting results

  • Make the mask slightly bigger than the object. Shadows and reflections belong to the object, and leaving them behind makes the edit look pasted on.
  • Match the surroundings. Mentioning "soft window light from the left" helps new content fit the existing light.
  • Change one thing at a time. Each edit is easier to check, and a bad step doesn't ruin the others.
  • Compare the whole image, not just the edit. Some tools alter areas outside your selection, and OpenAI notes this about ChatGPT's editor.
  • Don't edit the same image dozens of times. Repeated passes can slowly degrade detail, so go back to the original when you can.
  • Use negative prompts. Clearly outline what the model shouldn't change, or what shouldn't appear in the newly filled area.

Try AI inpainting on SYNTX.AI

The fastest way to learn inpainting is to try one small edit. Here are four to start with.

  • Remove an object. Upload a photo to Nano Banana 2.1 and describe what to take out.
  • Replace a background. Select the area in Seedream 5 Pro and describe the new scene.
  • Fix text on a poster. Edit the wording in Ideogram 4.5.
  • Swap an object in a video. Use Kling 4.0 or Seedance 2.5.

SYNTX.AI keeps all of these and 100+ other tools in one interface, under one subscription, so you can run the same edit on several models and keep the best result.

FAQ

What does inpainting do?

Inpainting regenerates a selected part of an image, so you can remove, replace, repair or add something while the rest of the picture stays the same.

What is inpainting vs. outpainting?

Inpainting changes content inside the existing frame, while outpainting adds new content beyond the borders to extend the canvas. Outpainting is harder, because the model has real pixels on only one side.

Can ChatGPT do inpainting?

Yes. ChatGPT's image editor lets you highlight an area with the Select tool and describe the change, or you can describe it in chat. OpenAI says highlights aren't always precise, so edits may extend beyond the selection. Developers can also send an image plus a mask to the image edits API. GPT Image 2.5 is also available on SYNTX.AI.

Which inpainting model is the best?

There's no single best model, since it depends on the task. Nano Banana 2.1 and GPT Image 2.5 suit edits described in words, Seedream 5 Pro suits selecting a region, Ideogram 4.5 suits photo restoration and text fixes, and Stable Diffusion suits full local control. Test the same edit on two models and compare.

Does Stable Diffusion support inpainting?

Yes. Inpainting is built into Stable Diffusion: there are official inpainting checkpoints for SD 1.5 and SDXL trained to fill a masked area and blend it in, and tools like ComfyUI and AUTOMATIC1111 include inpaint workflows. It’s one of the main uses for the model. You can remove objects, fix faces or hands and change details without regenerating the whole image.

Does inpainting work in video?

Yes, inpainting also applies to video. You mask an area, describe the desired change in a text prompt, and an AI model like Seedance 2.5 or Kling 4.0 regenerates the selected pixels. That said, AI video inpainting is more complex than image inpainting because the model has to edit several frames instead of just one.

Discover more

Seedream 5.5 Review: What’s New in ByteDance’s Latest Image Model

Seedream 5.5 Review: What’s New in ByteDance’s Latest Image Model

GPT Image 2.6 Is Out: Features and Our First Impressions

GPT Image 2.6 Is Out: Features and Our First Impressions

Higgsfield Review: Soul 2.0 and Alternatives

Higgsfield Review: Soul 2.0 and Alternatives