live
MODEL IDideogram:4.5@precise-edit

Ideogram 4.5 Precise Edit

Ideogram
by

Ideogram 4.5 Precise Edit is the precision editing variant of Ideogram 4.5. It applies a natural-language instruction to a source image, optionally limited by a mask and guided by up to four reference images, and restores unchanged pixels from the source so framing, color, and surrounding detail stay intact across many rounds of edits. It keeps the source dimensions and suits retouching, product and color changes, and multi-step design revisions.

Ideogram 4.5 Precise Edit

Masked edits

How to limit an Ideogram 4.5 Precise Edit to one region with a mask, from picking one object out of several to printing a reference graphic onto a garment.

Introduction

A mask tells Ideogram 4.5 Precise Edit where an edit is allowed to land. You pass a black and white image the same size as the source, white over the region to change, and the instruction is aimed there. Whatever the edit does not change comes back from the source untouched, the same way it does on any Precise Edit.

That turns one photo shoot into every colorway of the product. The jacket below was shot once in olive, and each variant is one masked edit on that frame.

Switch to the mask to see the region every colorway was aimed at, then through the variants. The quilting lines and the zipper sit in the same place in all four, and his face and the studio wall never change.

This guide covers the mask rules, using a mask to pick one object out of several, placing something new, combining a mask with references and making a mask of your own.

How the mask works

The mask goes in inputs.maskImage, next to the source in inputs.seedImage. Four rules decide whether it works:

  • White edits, black keeps. White marks where the edit goes. It is a strong guide rather than a clipping path, as the desk example below shows.
  • Same size as the source. The mask must match the pixel dimensions of inputs.seedImage exactly.
  • Both regions present. A mask that is entirely white or entirely black is rejected.
  • Hard edges only. Gray values round to the nearest of black or white, so a feathered brush does not feather the edit.

The jacket mask in the hero is a rough polygon, not a cutout. It covers the jacket with room to spare and stops below the chin, so the face sits outside the region the edit is aimed at. The instruction does the fine work of finding the jacket inside that region, which is why the white t-shirt under the mask stays white.

Try in Playground
import { createClient } from '@runware/sdk'

const client = await createClient({ apiKey: process.env.RUNWARE_API_KEY })
await client.connect()

const [result] = await client.run({
  model: 'ideogram:4.5@precise-edit',
  positivePrompt: 'Change the color of the quilted puffer jacket to a soft sage green. Keep its shape, its quilting, its zipper and the way it sits on him exactly the same.',
  inputs: {
    seedImage: 'https://example.com/jacket-olive.jpg',
    maskImage: 'https://example.com/jacket-mask.png'
  }
})
import asyncio
import os

from runware import Runware


async def main():
    async with Runware(api_key=os.environ["RUNWARE_API_KEY"]) as client:
        results = await client.run({
            "model": "ideogram:4.5@precise-edit",
            "positivePrompt": "Change the color of the quilted puffer jacket to a soft sage green. Keep its shape, its quilting, its zipper and the way it sits on him exactly the same.",
            "inputs": {
                "seedImage": "https://example.com/jacket-olive.jpg",
                "maskImage": "https://example.com/jacket-mask.png"
            }
        })


asyncio.run(main())
curl https://api.runware.ai/v1 \
  -H "Authorization: Bearer $RUNWARE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[
    {
      "taskType": "imageInference",
      "taskUUID": "3b8e1f6a-92c4-4d07-a5e1-7c0f2d9b4e63",
      "model": "ideogram:4.5@precise-edit",
      "positivePrompt": "Change the color of the quilted puffer jacket to a soft sage green. Keep its shape, its quilting, its zipper and the way it sits on him exactly the same.",
      "inputs": {
        "seedImage": "https://example.com/jacket-olive.jpg",
        "maskImage": "https://example.com/jacket-mask.png"
      }
    }
  ]'
runware run ideogram:4.5@precise-edit \
  positivePrompt="Change the color of the quilted puffer jacket to a soft sage green. Keep its shape, its quilting, its zipper and the way it sits on him exactly the same." \
  inputs.seedImage=https://example.com/jacket-olive.jpg \
  inputs.maskImage=https://example.com/jacket-mask.png
{
  "taskType": "imageInference",
  "taskUUID": "3b8e1f6a-92c4-4d07-a5e1-7c0f2d9b4e63",
  "model": "ideogram:4.5@precise-edit",
  "positivePrompt": "Change the color of the quilted puffer jacket to a soft sage green. Keep its shape, its quilting, its zipper and the way it sits on him exactly the same.",
  "inputs": {
    "seedImage": "https://example.com/jacket-olive.jpg",
    "maskImage": "https://example.com/jacket-mask.png"
  }
}
Response
[
  {
    "taskType": "imageInference",
    "taskUUID": "3b8e1f6a-92c4-4d07-a5e1-7c0f2d9b4e63",
    "imageUUID": "f4c2a7e9-1d3b-4f86-9c50-8e2b6a1d7f34",
    "imageURL": "https://im.runware.ai/image/os/a14d18/ws/2/ii/f4c2a7e9-1d3b-4f86-9c50-8e2b6a1d7f34.jpg"
  }
]

Picking one object out of several

An instruction names a thing, and a frame with two of that thing is ambiguous. The sofa below has two identical pillows, and the instruction asks for "the throw pillow".

A light gray three-seat sofa against a white wall with two identical cream pillows, one in each corner

Photorealistic furniture catalog photograph of a light gray three-seat fabric sofa standing against a plain white wall on a pale oak floor, with two identical plain cream linen throw pillows, one propped in each corner of the sofa. Straight-on shot at seat height with a 50mm lens, the sofa centered and filling the middle of the frame. Soft daylight from the left, gentle shadows, clean neutral palette.

SourceWithout a mask
The same sofa with the masked area over the left end highlighted

Photorealistic furniture catalog photograph of a light gray three-seat fabric sofa standing against a plain white wall on a pale oak floor, with two identical plain cream linen throw pillows, one propped in each corner of the sofa. Straight-on shot at seat height with a 50mm lens, the sofa centered and filling the middle of the frame. Soft daylight from the left, gentle shadows, clean neutral palette.

Source and maskWith the mask

Without the mask, the model has to decide which pillow you meant, and it changed both. With the mask over the left end of the sofa, only the left pillow changes and the right one stays cream linen. The instruction did not get more specific. The mask answered the question the words left open.

Rewording can sometimes do the same job ("the pillow on the left"), but a mask is the answer that does not depend on wording, which matters when the same edit runs across a catalog of photos with different layouts.

Placing something new

When the edit adds an object, the mask marks where the object goes. The instruction below only asks for a plant on the desk, and the mask puts it beside the notebook.

A white desk against a light gray wall, with a laptop and a notebook on the left and a tall masked area just right of the notebook

Photorealistic lifestyle photograph of a minimal home office: a white desk against a plain light gray wall, a closed silver laptop and a small notebook on the left side of the desk, and the right half of the desk top completely empty. Straight-on shot at desk height with a 35mm lens, the desk top running across the lower middle of the frame. Soft window light from the right, clean and bright.

Source and maskResult

The mask does not set the size, though, and it is not a clipping path. The top leaf above already grows past the region, and with a small square instead the plant came back at about the same size: the pot fills the square and the leaves grow well past its top edge.

The same desk with a small square masked area on its right side

Photorealistic lifestyle photograph of a minimal home office: a white desk against a plain light gray wall, a closed silver laptop and a small notebook on the left side of the desk, and the right half of the desk top completely empty. Straight-on shot at desk height with a 35mm lens, the desk top running across the lower middle of the frame. Soft window light from the right, clean and bright.

Source and maskResult

So draw the region for the whole object, leaves and contact shadow included, rather than for the part you picture first. A region that is too small does not shrink the object, it only gives up control over where the overflow goes.

Masks with references

A mask combines with inputs.referenceImages, which is how a reference graphic lands on an exact spot. With a mask, Precise Edit accepts up to three references, one fewer than without.

A woman in a plain heather gray hoodie against a light gray backdrop, with the masked area over the chest highlighted

Photorealistic apparel mockup photograph of a woman in her mid twenties with her hair tied back, standing facing the camera against a plain light gray studio backdrop, wearing a plain heather gray pullover hoodie with no print and the hood down, and black leggings. Framed from mid-thigh to just above the head, the chest of the hoodie clearly visible and centered. Soft even studio light, realistic cotton fleece texture.

Source and maskResult
Built from 1 reference
  • Reference

The mask decides where the print goes, and the reference decides what it looks like. The badge comes through intact, lettering and trail included, centered in the masked area of the chest. That is a print-on-demand mockup: one blank garment photo, any customer's artwork.

Making a mask

Paint over the region you want to change and download the result. The file comes out white on black at the source's own size, which is the format inputs.maskImage expects.

30
50%
100%

Drop an image here or browse

For a repeatable pipeline, draw the mask in code instead. A rectangle or polygon over a known region is usually enough, because the instruction finds the object inside it and restoration puts everything else back.

When to leave the mask out

Without a mask, the instruction applies to the whole image, and restoration still returns every pixel the edit did not change. That is the right call for changes that are meant to touch the whole frame, such as relighting or a change of season, and for targets that appear only once. See Iterative editing for a whole chain run without masks.

Tips

  1. Paint generously. A region with room to spare beats a tight cutout that clips a sleeve, and a new object needs space for all of itself or it spills past the edge.

  2. Keep naming the target. The mask limits where the edit can happen, and the instruction still says what to change inside it.

  3. Export at the source's exact size. A mask one pixel off in either dimension is rejected.

  4. Count your references. A masked edit takes three at most, four without the mask.