remask_image
Re-blend a masked edit result with a new mask locally to fix seams, ghosted edges, or mask-size issues without another model call or upload.
Instructions
Redo the mask blend of a masked edit_image result with a new mask: free and offline.
Use it when a masked edit came back with a good change that blends badly, such as
a seam or a ghosted edge where the model drew past the mask (a limb or shadow cut
off at the mask edge), or when the mask should have been bigger or smaller. Draw a
new mask and call this instead of paying for another edit_image: it re-blends the
model's image that the edit already returned, on this computer. Nothing is
uploaded, no model is called and it costs nothing.
It needs a result made by edit_image with mask_path by openrouter-image-mcp
0.2.0 or later: those keep the model's image before the blend as
<result>.unmasked.png, next to the result and its .json sidecar. The original
input image must still be in place and unchanged. A re-masked result can itself
be re-masked.
All paths must be absolute (or start with "~"); relative paths are rejected. The
new image is saved as a PNG next to image (never overwriting) with a JSON
sidecar, unless output_dir is given. The result lists the saved path, plus a JPEG
preview.
Args:
image: Absolute path of a masked edit_image result (or of an earlier
remask_image result).
mask_path: Absolute path of the new mask for the original input: white = take
the model's image, black = keep the original. Any size; it is stretched
to the input's size.
mask_feather_px: Blur radius in pixels for the mask edge; by default it is
chosen from the image size.
output_dir: Folder to save into instead of next to image. Must be an
absolute path or start with "~".
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| image | Yes | ||
| mask_path | Yes | ||
| output_dir | No | ||
| mask_feather_px | No |