AI inpainting lets you mask a region of any image and regenerate just that part — swap a jacket for a coat, fix a closed eye, add an object that was never there, or replace one item with another. The rest of the photo stays exactly as it was. On Android, the whole edit is a brush stroke, a short prompt, and a few seconds of generation, with no desktop software and no manual pixel work.
This guide explains how AI inpainting actually works, walks through the mask-and-regenerate workflow in FP AI Studio, shows how to prompt the masked area, and draws the line between inpainting, outpainting, and object removal so you reach for the right tool every time.
The core idea: inpainting is targeted regeneration, not painting over pixels. You hand the model a hole and a description, and it fills the hole with content that matches the surrounding light, perspective, and texture — which is why a tight mask and a precise prompt matter more than the size of the edit.
What AI inpainting is
AI inpainting is the technique of masking a region of an image and regenerating only that region with new, AI-generated content while leaving everything else untouched. You select an area, optionally describe what should appear there, and the model paints in pixels that blend with the surrounding scene — so the edit reads as part of the original photo rather than a paste-over.
That one capability covers a wide range of edits that used to need separate tools or a full reshoot:
- Change — swap clothing, hair, or backgrounds within the frame
- Fix — repair faces, hands, blemishes, or damaged areas
- Add or replace — drop in a new object, or substitute one element for another
The word inpainting comes from photo restoration, where conservators painted over scratches and gaps in a damaged print. The AI version keeps that spirit — repairing what is missing — but adds the ability to generate something entirely new in the masked area, guided by a text prompt. That shift is what turns a repair tool into a general-purpose editor: the same brush that patches a torn corner can also dress a subject in a different outfit or place an object that was never in the original scene.
How AI inpainting works
AI inpainting runs on a generative model that reads the pixels around a masked region and predicts the most probable content for the gap, then synthesizes new pixels to fill it. When you supply a prompt, the model conditions its prediction on your text so the fill matches both the surrounding scene and your description. Models trained on huge image-text datasets reconstruct texture, lighting, and edges that older patch tools could only fake.
The pipeline behind a single generation looks like this:
- Select — you brush over the region you want to change
- Mask — the app turns your stroke into a precise selection edge
- Context analysis — the model reads the pixels surrounding the mask
- Conditioned fill — it generates new pixels guided by your prompt and the scene
- Blend — the fill is feathered and matched to the original light and grain
Two details decide quality here: how tightly the mask hugs the target, and how clearly your prompt describes the result. The model feathers the mask edge to avoid a hard seam, and because each generation samples differently, re-running the same mask often produces a cleaner fill on the second or third try.
It helps to picture what the model is actually solving. Inside the mask it knows nothing; outside it has the full image. Its job is to extend the visible scene inward so the boundary disappears. A large mask gives it a wide blank to invent, which raises the odds of a mismatch in lighting or perspective. A small mask surrounded by consistent detail gives it strong cues to copy from, which is why precise selections almost always blend better than sweeping ones. Your prompt then steers the content within that space — without it, the model simply continues the most likely background.
How do I inpaint an image step by step?
To inpaint an image in FP AI Studio, open your photo, brush over the area you want to change, type a short prompt describing the result, and tap generate — the AI regenerates only the masked region in a few seconds. The full workflow takes under a minute, and you can re-run a region until the blend reads cleanly.
- Open your photo in FP AI Studio and choose the inpainting tool
- Brush over the area you want to change, add, or fix
- Tighten the mask — zoom in and trim the selection so it hugs the target edges
- Write a prompt describing what should appear in the masked area
- Tap generate and wait a few seconds for the fill
- Inspect at 100% — check the seam between the fill and the original
- Re-run if needed — regenerate for a different result, or refine the mask and prompt
- Export at full resolution once the edit reads cleanly
For deeper edits — say, replacing a garment and then brightening the scene — chain the steps in order using the Android photo editor guide so each pass builds on a clean result.
What can you change with inpainting?
The most common inpainting edits are changing clothing, fixing faces, and adding or replacing objects. Each follows the same mask-and-regenerate workflow but benefits from a different brush size, amount of surrounding context, and prompt detail. Knowing the pattern for your edit speeds the work and improves the blend.
- Change clothing — mask the garment and prompt the new fabric, color, and cut while pose and lighting stay fixed
- Fix faces — mask a small area such as a closed eye or an odd expression, keeping the rest of the face untouched
- Add objects — mask empty space and prompt the item you want, matched to the scene's perspective
- Replace objects — mask one element and prompt another in its place
- Repair damage — mask scratches, dust, or torn areas on scanned and old photos
One responsible-use note: inpainting can alter how people and products appear, so edits meant to mislead — fabricated evidence, deceptive product claims, or impersonation — cross an ethical and often legal line. Use the tool on content you own and for edits you would be comfortable disclosing.
How do I write a good inpainting prompt?
A good inpainting prompt names the subject, its material or color, and how it should sit in the scene — short, specific, and focused only on the masked area. The model already sees the surrounding pixels, so you describe what changes, not the whole image. Vague prompts like "make it better" give the model nothing to anchor to and produce inconsistent fills.
- Name the subject plainly — "a navy wool overcoat," not "nice outfit"
- Add material and color — texture and tone help the fill match the scene's light
- Describe placement — "buttoned, falling to the knee" keeps the result physically plausible
- Skip the rest of the image — only describe the masked region, not the background
- Iterate in small steps — adjust one word, regenerate, and compare
The same habits that improve full-image generations apply to masked edits. For a deeper look at structuring descriptions, materials, and modifiers, the AI prompt engineering tips guide covers the patterns that carry over directly to inpainting.
How do I get clean, seamless results?
Clean inpainting comes down to three habits: mask tightly, prompt precisely, and edit one element at a time. Over-large masks, vague prompts, and trying to change several things at once cause most of the seams, ghosting, and mismatched lighting people complain about.
- Mask the whole target — leftover edges force the model to rebuild around a fragment
- Leave a little surrounding context — the model needs nearby pixels to match light and texture
- Write a specific prompt — name the subject, material, and placement
- Edit one element per pass — sequential edits blend better than one busy mask
- Regenerate for a better fill — each run samples differently, so try two or three
- Inspect the seam at 100% — check where the fill meets the original before exporting
When an edit is mostly removing something rather than replacing it — a stray object or a photobomber — the prompt-free path is faster. The AI object remover guide covers that background-fill workflow in detail.
Inpainting vs outpainting vs object removal
Inpainting, outpainting, and object removal share the same generative fill technique but solve different problems, and they are easy to confuse. Inpainting regenerates a region inside the frame, outpainting extends the scene beyond the edges, and object removal erases an element and fills behind it. Pick the tool that matches where you want the change to happen.
| Tool | What it does | Best for |
|---|---|---|
| Inpainting | Regenerates a masked region inside the image, guided by a prompt | Changing, fixing, adding, or replacing content in the frame |
| Outpainting | Generates new scene beyond the original edges | Reframing, widening a crop, changing aspect ratio |
| Object removal | Erases an element and fills behind it with background | Cleaning up a photo you keep whole, no prompt needed |
The three chain well together. A common sequence is to inpaint a fix or a swap, expand the frame for a wider crop with outpainting, then remove any stray distraction the wider crop revealed.
The quickest way to choose is to ask where the change lives. If it sits inside the existing photo and you want to alter, add, or replace it, that is inpainting. If you need more scene than the camera captured — sky above a portrait, floor below a product — that is outpainting. If the goal is simply to make something vanish and leave the background looking untouched, object removal is the prompt-free shortcut. The decision rarely depends on the subject and almost always on whether you are editing inward, extending outward, or erasing.
When does AI inpainting struggle?
AI inpainting struggles with very large masks, hands and fine anatomy, repeating patterns, and edits that contradict the surrounding scene. The less consistent context the model has, the more it has to invent — and invented detail is where seams and artifacts appear.
- Very large masks — little surrounding context left to match against
- Hands and fine anatomy — fingers and joints are hard to regenerate convincingly
- Repeating patterns — tile, brick, or fabric where a seam is easy to spot
- Scene contradictions — a prompt that fights the existing perspective or lighting
When an edit is too ambitious for one pass, split it: regenerate the easy region first, then mask the difficult remainder against the cleaner result you just created, with a tighter prompt the second time.
FAQ
What is the difference between AI inpainting and outpainting?
AI inpainting regenerates a region inside the existing image, so you change or replace something within the frame. Outpainting generates new scene beyond the original edges, extending the canvas outward. Inpainting edits what is already there; outpainting adds what was never in the photo. Both rely on the same generative fill technique applied to different areas.
Can AI inpainting change clothing in a photo?
Yes. Mask the existing garment, write a prompt describing the new clothing, and generate. The model keeps the pose, lighting, and body while regenerating only the masked fabric. Results are cleanest when the mask follows the edge of the original clothing closely and your prompt names the material, color, and cut you want.
Does AI inpainting work for fixing faces?
Yes, inpainting is a common way to fix small face problems such as closed eyes, an odd expression, or a blemish. Mask only the area that needs work and keep the rest of the face untouched, so the model regenerates a small region that blends into the surrounding features rather than redrawing the whole face.
How do I get clean results with AI inpainting?
Mask tightly, write a clear prompt, and edit one element at a time. A precise mask that hugs the target gives the model a defined area to work in, and a specific prompt tells it what to put there. Because each generation samples differently, re-running the same mask often yields a cleaner blend on the second or third attempt.
Is AI inpainting the same as object removal?
Object removal is one use of inpainting. Removal masks an element and fills the gap with background so it disappears, with no prompt needed. General inpainting can also add or replace content using a prompt, so it does more than erase. Object removal is the prompt-free, background-fill case of the broader inpainting technique.