Inpainting vs outpainting: what AI fill and expand actually do
By Pixuvia ·

The difference between inpainting and outpainting is where the new pixels go. Inpainting fills a marked area inside an image: you paint or select the part to replace, and an AI model paints new pixels there that match what surrounds it. Outpainting extends an image past its edges: the canvas grows and the model paints the new strips so they continue the picture. Object removal and generative fill are inpainting; generative expand is outpainting.
Both run on the same idea, a picture plus a mask that says which pixels to paint. The difference is how much real image the model gets to work from, and that explains most of what each is good and bad at. Below: how the models use the surrounding pixels, where they go wrong, how to steer them, and which Pixuvia tools do which.

On this page
Inpainting vs outpainting at a glance
| Inpainting | Outpainting | |
|---|---|---|
| What gets painted | A marked area inside the image | New canvas outside the original edges |
| What the model reads | Real pixels on every side of the hole | Real pixels on one side of each new strip |
| Common names | Object removal, erase, generative fill, magic eraser | Expand, extend, uncrop, generative expand |
| Good at | Removing people, wires, clutter; replacing one object | Changing aspect ratio, adding sky, sand or headroom |
| Weak at | Large holes, text, hands, repeating patterns | Seams, drifting perspective, new objects far from the photo |
| In Pixuvia | Erase object, Generative fill | Expand image, Generative Expand |
How does AI inpainting work?
Every inpainting model gets two inputs: the image with a hole in it, and a mask marking the hole. In the Diffusers library's guide, the mask is white where the model should paint and black where it should keep the picture. What the model paints is decided by what it sees around the hole: the colors, textures, light and lines that run into it.
Older, non-AI fills copy patches of texture from elsewhere in the image. That still works well for small spots, and the Editor's Spot Healing Brush, Remove tool and Content-Aware Fill work that way, with no AI model involved. Learned models go further because they have seen millions of images and can paint something plausible that is not anywhere in yours.
How far a model looks around the hole matters. The LaMa paper (Suvorov and others, WACV 2022) argued that inpainting networks failed on large holes because they could not look far enough, and used fast Fourier convolutions to see the whole image at once. Trained on 256 × 256 pixel images, it held up at around 2000 pixels, including on what the authors call periodic structures: repeating patterns that have to line up.

Diffusion models, such as Stable Diffusion and FLUX, take the masked image as part of their input while they generate. The Stable Diffusion inpainting model card describes five extra input channels for this: four for the encoded masked image and one for the mask. The prompt, when there is one, says what to paint; the surrounding pixels say how it should look so it blends in.
Inpainting-trained models blend more naturally, but the Diffusers guide notes that they are also more likely to change pixels outside the mask. Editing apps therefore usually paste only the masked area back into the original. Pixuvia does this: for Erase, Generative fill and Expand, the AI result is blended onto the full-size original with a soft edge, so the rest of the photo keeps its exact pixels and resolution.
How does AI outpainting work?
Outpainting is inpainting at the edge. It uses the same machinery: put the photo on a larger canvas and mark everything new as the area to paint. Black Forest Labs describe their FLUX.1 Fill models as inpainting and outpainting models that work from a text description and a binary mask, and say outpainting lets you extend images beyond their original borders.

The catch is context. A hole in the middle of a beach is surrounded by beach. A strip added to the left of a portrait photo touches real pixels only along one edge, and its far side touches nothing. Close to the photo, the model continues what it sees; further out, it has to invent. That is why expanded areas often look convincing near the seam and more generic toward the outer edge.
Where do inpainting and outpainting fail?
Both struggle with text, people, patterns that must line up and areas far from real pixels:
- Text and signs: letters come out as letter-like shapes. The Stable Diffusion inpainting model card lists "cannot render legible text" among its limitations. Remove text with inpainting if you like, but add new text with a text tool.
- Hands, faces and people: the same model card warns that faces and people may not be generated properly. Filling over part of a person invites extra fingers and odd joints.
- Repeating patterns and straight lines: tiles, bricks, fences, window rows and horizons need to line up exactly across the fill. A slight shift in spacing or angle stands out at once.
- Seams in large expansions: big new areas can show a visible line where the photo ends, a change in grain, or a horizon that steps or tilts.
- Mismatched light: a filled area can ignore the light direction, miss a shadow the scene needs, or come out a little warmer or cooler than its surroundings.
- Softer detail: models work at a limited size. Pixuvia sends a copy of at most 4 megapixels and blends the answer back into the full-size photo, so a large filled area can look softer than the sharp pixels around it.
- Leftovers: a shadow, reflection or edge of the removed object that was not in the mask often stays behind, or the model rebuilds a vague copy of the object from it.
How do you get better inpainting and outpainting results?
Mask carefully, prompt only where the tool asks, and work in small steps.
Selection size and shape
Cover the whole object with a small margin, and include its shadow and any reflection: the model treats anything left outside the mask as part of the scene to match. Don't paint far beyond the object either. The bigger the hole, the more the model has to invent and the less real picture is left to guide it. In the Editor, Generative fill and Erase with AI send the selection plus a margin of half its longest side (at least 64 pixels) on every side, so that margin is what the model reads.
Prompts
A prompt only matters where the tool takes one. Generative fill asks "What goes there": describe the thing you want, short and concrete, such as "a wooden bench" or "calm water". Erase object takes no prompt; it always fills with background. Expand needs no prompt either; it writes its own. If a removal keeps bringing an object back, the cause is usually the mask, not the missing prompt: paint a little wider and include the shadow.
Smaller steps
Several small fills beat one big one: remove one person at a time, or fill a long wire in sections. For expansion, grow one side or a modest amount at a time, check the seam, and continue. In the Editor's Generative Expand you set the exact new size and the anchor, so the photo can stay at one edge while the canvas grows on the other. Results there land on their own layers, so you can mask off a bad part, lower its opacity or delete it and try again; non-destructive editing explains why that matters.
Chat-based editors are heading the same way. With Images 2.6, OpenAI says image markup, already available in ChatGPT, comes to its API so teams can pinpoint exactly where to make changes; our post on ChatGPT Images 2.6 covers that release. Adobe's object removal and image expansion are also coming to the Windows 11 Photos app, as Adobe AI tools in Windows Photos reports.
Which Pixuvia tools inpaint and which outpaint
Inpainting, in the Studio: Erase object (paint over what you want gone with a brush or a lasso, no prompt) and Generative fill (paint an area, then describe what goes there). In the Editor, the same two are Edit > Erase with AI… and Edit > Generative Fill…, working on a selection and adding the result as a new layer. The object remover page runs Erase on its own. For step-by-step help, see how to remove an object from a photo and how to use generative fill.

Outpainting: Expand image in the Studio grows the photo to 1:1, 4:5, 16:9 or 9:16 and fills the new edges. The Editor's Image > Generative Expand… takes an exact size in pixels or percent and an anchor, and puts the new area on a layer under the image. The image extender page does it on its own, and how to extend an image background covers which shape to choose for each use.


Every AI run uses credits, so set up the mask or shape with care before you start one, and check text, hands and straight lines in the result before you use it. Photo editing terms explained covers masks, layers and the rest of the vocabulary used here. Posting the result? Will Instagram label my edited photo as AI? explains how those labels are decided.
Questions
Is generative fill the same as inpainting?
Yes, generative fill is inpainting with a prompt: you select an area inside the image and describe what should go there, and the model paints it to match the surroundings. Object removal is inpainting without a prompt, where the model fills the area with plausible background.
Is outpainting the same as generative expand?
Yes. Generative expand, expand image and AI extend are names for outpainting: the canvas grows past the photo's edges and a model paints the new area so it continues the picture.
Why does AI fill leave a blurry patch?
Usually because the model worked on a smaller copy of the photo, or the filled area is large. The result is scaled to fit and blended in, so it can look softer than the sharp pixels around it. Fill smaller areas one at a time, or sharpen or add a little grain to the patch.
Can inpainting add text or a logo?
It is unreliable. Many inpainting models produce text-like shapes rather than correct letters; the Stable Diffusion inpainting model card says outright that it cannot render legible text. Add text with a text tool on its own layer instead.
How much can I expand a photo?
Technically a lot, but the further the new area gets from the real pixels, the more the model invents. Growing a portrait photo to 16:9 adds more new canvas than the photo itself. For large changes, expand in smaller steps and check each one.