Masks and Inpainting
Use image masks and inpainting in Precise Edit or GPT Image 2.5: mask versus edit window, reference limits, multi-turn editing and how to fix a blocked edit.On this page
A mask marks the part of an image you want to change. Editing a marked area is often called inpainting. Use it to:
- change or remove one object, such as a cup on a table or a sign on a wall
- change a face, an outfit or the colors of one item
- replace the background behind a person or product
- retouch or restore one part of an old or damaged photo
Ideogram 4.6, Ideogram 4.5 and GPT Image 2.5 take masks.
Precise Edit with Ideogram 4.6
Choose Ideogram 4.6 in Precise Edit to change an image with a prompt and an optional mask. Quality starts at Medium; Very low, Low and High are also available. Check the price on Apply edit after choosing your settings.
The 4.6 edit window can cover up to 16,777,216 pixels (4096 × 4096), with a longest side of 8192 px. Ideogram 4.5's window covers up to 4,194,304 pixels (2048 × 2048), with a longest side of 4608 px. These limits describe the area the model works on. At Very low quality, 4.6 also uses the 2K area limit and 4608 px side limit. See edit windows.
To keep a large source image at its full size, use an edit window within these limits. Editing the whole image above the area limit scales the result down. An automatic window needs a mask that fits within the limit; a larger mask can fall back to a whole-image edit.
Mask an image with Ideogram 4.6 or 4.5
Both models use the following mask tools in Precise Edit. The screenshots show the 4.5 workflow.
Open the image and select Edit. Precise Edit opens with your image loaded.
On the image, select Add a mask.

Select Add a mask on your image.
Mark the part you want to change with a tool:
- Magic wand: click an object to select it. Click more parts to add them.
- Brush: paint over the area.
- Lasso: draw around the area.
- Rectangle: drag a box.
Switch to Erase to remove part of the mask, or use Clear mask to start again.

The sofa is masked with Magic wand. Click Done when the mask covers the area.
Click Done.
Under What should change?, describe the change for that area, such as "mustard yellow velvet upholstery".
Optional: choose Quality and Number of images. See Precise Edit settings.
Click Apply edit. The button shows the cost.

Describe the change, then click Apply edit.
You can also add reference images that show the result you want: up to 3 with a mask, or 4 without one. Adding a mask uses one reference slot, so remove an extra reference if you're already at the limit. Eligible accounts can use weekly free credits for Precise Edit. The price depends on the model, quality and source image size; check Apply edit before running. Without a weekly allowance, or after it runs out, you need a paid plan or bought credits.
Precise Edit settings
- Quality: Very low, Low, Medium or High. The default is Medium.
- Number of images: 1 to 8 results per run. The default is 1.
Changing either setting changes the cost shown on Apply edit. You can also leave the image unmasked when you want an edit across the whole image.
Limit the edit with an edit window
If Use Edit Window is available on your account, it keeps the edit inside one part of the image. This option appears under Advanced settings once you've added a source image.
Open Advanced settings.
Turn on Use Edit Window.
Choose Specific area to pick the area yourself, or Auto (requires mask) to base it on your mask.

Use Edit Window sits under Advanced settings.
Areas outside the mask can still change slightly, so compare the result with the original before you use it. A mask marks what you want to change; an edit window limits the region that the edit can use. You can use a specific window without a mask, while Auto (requires mask) is unavailable until you add one.
When using both, put the mask inside the window. Painted areas outside it are left out of the edit. If you see Paint inside the edit window, or move the window over what you painted, move the window over the selection or repaint inside it before trying again.
If the window switch is unavailable, check its explanation. A small image can't use an edit window. An image that is too wide or tall to edit as a whole always uses one, so you can't turn it off.
Edit again and again (multi-turn editing)
Multi-turn editing means using one edit's result as the source for the next. Change one thing per turn, say what should stay the same, and inspect each result before continuing. If a step moves away from what you want, start the next edit from an earlier saved result instead.
- Make your first edit in Precise Edit and wait for the result.
- Open the result and select Edit. Precise Edit opens again with that result loaded.
- Mask the next area if you want, describe the next change, and click Apply edit.
- Repeat for each change.
Each result saves to Assets and Library → Generations, so you can open an earlier step and branch from it. Selecting Edit loads that result; it does not automatically run the next change.
Three edits in a row with Ideogram 4.5. Each prompt changed one thing and kept the rest:

Original.

Edit 1: the sofa is now green velvet.

Edit 2: the print is now a fern illustration.

Edit 3: evening light, with the lamp switched on. Every object stays in place.
The prompts for that example:
- "Change the sofa upholstery to deep forest green velvet. Keep the sofa's shape and the rest of the room exactly the same."
- "Replace the abstract print inside the black frame with a vintage botanical illustration of a large fern. Keep the frame and everything else exactly the same."
- "Make it evening: dusky blue light through the window, and the table lamp switched on. Keep every object exactly where it is."
More examples
A storefront rebrand over nine edits. Four of them are shown here:

Original.

Edit 1: the car and trash can removed.

Edit 3: a navy awning and a gold sign.

Edit 9: the finished shop at dusk.
Photo restoration in three edits:

Original: a damaged 1920s wedding photo.

Edit 1: scratches, stains and fading repaired.

Edit 2: colorized.

Edit 3: sharpened into a modern-looking photo.
For restoration, the first prompt was: "Restore this old photograph: remove every scratch, dust speck, stain, crease, tear and film blemish, even out the faded tones and recover the detail. Keep it black and white and keep every person and letter exactly as it is."
Mask with GPT Image 2.5
- Click Image in the sidebar.
- In the Model picker, choose GPT Image 2.5 Flare or GPT Image 2.5 Sunburst.
- Add a reference image.
- On the first image, select Add a mask.
- Mark the part you want to change with Magic wand, Brush, Lasso or Rectangle. Use Clear mask to start again.
- Click Done.
- Describe the change and click Generate.
"A masked run keeps the shape of the image you painted on," so Aspect ratio is locked while a mask is on.
If Precise Edit will not start
- Attach a Source image and enter an instruction under What should change? A mask alone does not describe the replacement you want.
- If you see Wait for the mask to finish processing, wait for that step before applying the edit.
- If adding a mask takes you over the reference limit, remove an extra reference. The app allows three reference images with a mask or four without one.
- If an edit window and a mask do not overlap, move the window or repaint the mask as described above.
Change a mask
On either model, select Edit mask on the image to change the mask, then click Done.
Other ways to change one area
- Select area in Studio works the same way on one layer of a Studio canvas. It needs a paid plan.
- The Object Remover app takes an object out and fills the gap, with no prompt. See Remove Backgrounds and Objects.
- Remove BG cuts out the subject instead of changing the background. See Remove Backgrounds and Objects.
- To add to an image beyond its edges (outpainting), use Extend in Studio.
In this topic: editing
- Edit Images: choose the right way to edit
- Masks and Inpainting (this page): change only one area
- Studio: combine images, layers and text
- Text and Layers: fix or add lettering
- Remix: make new versions of an image
- Troubleshooting: fix common problems
Related
Edit one region with a mask shows the mask format for Precise Edit and Inpaint, with code.