For the complete documentation index, see llms.txt. This page is also available as Markdown.

Masks and Inpainting

Use image masks and inpainting in Precise Edit or GPT Image 2.5. Learn mask versus edit window, reference limits, multi-turn editing and how to fix a blocked edit.

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.5 and GPT Image 2.5 both take masks.

Mask with Ideogram 4.5

Ideogram 4.5 masks work in the Precise Edit app. The result keeps your image's exact size.

  1. Open the image and select Edit. Precise Edit opens with your image loaded.

  2. On the image, select Add a mask.

    Precise Edit with a living room photo loaded and the Add a mask button highlighted on the image
    Select Add a mask on your image.
  3. 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.

    Mask editor with the sofa selected in blue, the Add, Erase, Magic wand, Brush, Lasso and Rectangle tools highlighted, and the Done button highlighted
    The sofa is masked with Magic wand. Click Done when the mask covers the area.
  4. Click Done.

  5. Under What should change?, describe the change for that area, such as "mustard yellow velvet upholstery".

  6. Optional: choose Quality and Number of images. See Precise Edit settings.

  7. Click Apply edit. The button shows the cost.

    Precise Edit with the sofa masked, the prompt Mustard yellow velvet upholstery entered under What should change, and the Apply edit button highlighted with its 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. Free accounts can make a limited number of Precise Edit edits. After that, Precise Edit needs 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.

  1. Open Advanced settings.

  2. Turn on Use Edit Window.

  3. Choose Specific area to pick the area yourself, or Auto (requires mask) to base it on your mask.

    Advanced settings open in Precise Edit with Use Edit Window turned on and the Specific area and Auto (requires mask) options highlighted
    Use Edit Window sits under Advanced settings.

The rest of the image stays unchanged. 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 very small image cannot use an edit window. An image that is too wide or tall to edit as a whole always uses one, so you cannot 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.

  1. Make your first edit in Precise Edit and wait for the result.

  2. Open the result and select Edit. Precise Edit opens again with that result loaded.

  3. Mask the next area if you want, describe the next change, and click Apply edit.

  4. 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:

A bright living room with a light gray sofa, an abstract print in a black frame, a round wooden table with tulips and a sheer-curtained window
Original.
The same living room with the sofa changed to deep green velvet and nothing else changed
Edit 1: the sofa is now green velvet.
The same room with the abstract print replaced by a framed fern illustration
Edit 2: the print is now a fern illustration.
The same room in the evening, with dusky blue light at the window and the table lamp on
Edit 3: evening light, with the lamp switched on. Every object stays in place.

The prompts for that example:

  1. "Change the sofa upholstery to deep forest green velvet. Keep the sofa's shape and the rest of the room exactly the same."

  2. "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."

  3. "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:

A brick storefront with a gray shingle awning, a parked blue car on the left and a trash can by the door
Original.
The same storefront with the car and trash can removed and the street filled in
Edit 1: the car and trash can removed.
The storefront with a navy awning and the sign HALDEN & CO. in gold letters above it
Edit 3: a navy awning and a gold sign.
The finished storefront at dusk with lit windows full of books, planters by the door and a chalkboard sign
Edit 9: the finished shop at dusk.

Photo restoration in three edits:

A damaged black-and-white photo of a 1920s wedding party with scratches, stains and faded tones
Original: a damaged 1920s wedding photo.
The same photo restored in black and white, with scratches and stains removed
Edit 1: scratches, stains and fading repaired.
The restored photo colorized with ivory dresses, pink and white flowers and green foliage
Edit 2: colorized.
The colorized photo turned into a crisp modern-looking photograph of the same moment
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

  1. Click Image in the sidebar.

  2. In the Model picker, choose GPT Image 2.5 Flare or GPT Image 2.5 Sunburst.

  3. Add a reference image.

  4. On the first image, select Add a mask.

  5. Mark the part you want to change with Magic wand, Brush, Lasso or Rectangle. Use Clear mask to start again.

  6. Click Done.

  7. 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

In this topic: editing

  1. Edit Images: choose the right way to edit

  2. Masks and Inpainting (this page): change only one area

  3. Studio: combine images, layers and text

  4. Text and Layers: fix or add lettering

  5. Remix: make new versions of an image

  6. Troubleshooting: fix common problems

Last updated