Magnific Retouch (inpaint)
Inpaint a region from a prompt β or just erase it
- image
- mask
- folder
- image
- creation_identifier
- metadata
A mask goes in, a prompt describes what the masked area should become, and the result comes back as an IMAGE. Two modes, and they do very different things.
mode = replace is inpainting: you masked a hand and the prompt says what the hand should become. prompt is only read in this mode - the tooltip says so, and the node won't silently ignore a typo'd prompt in the other mode. mode = erase removes what's under the mask and fills in something plausible, with no prompt involved. That second one is the "get this thing out of my shot" button, and it's the more useful of the two in practice: object removal is the job people most often want an API for.
The mask input is strict about one thing: it must be the same pixel size as the image. White (1.0) is the area to change. There's no auto-resize, because resizing a mask is how you get inpainting that touches pixels you didn't plan on.
Building the mask
This is the node where the pack's local masking genuinely pays off. Paint the region in the Image Mask Editor (C2C) - brush, polygon, lasso, bucket fill, SAM smart-select if you have a SAM 2.1 model - and its mask output wires straight in, at native resolution, with non-destructive grow/feather/threshold available as node parameters rather than baked into your brush strokes.
Or go automatic: SAM gives you the object, the pack's matting nodes clean the edge, and you never touch a brush. If your mask is bad, the pack even has a Mask Failure Explainer that reads your image and mask and tells you why the matte failed, which is a nicer debugging loop than guessing at settings.
Outputs
image (the retouched result), creation_identifier (Magnific's handle for that creation) and metadata - JSON with the model, prompt, size, date and the link to the creation. Wire metadata into Magnific Metadata (unpack) if you want any of those as proper sockets. The optional folder from Magnific Save To decides where the result is filed on Magnific's side; without it, your Personal project.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/Code2Collapse/ComfyUI-CustomNodePacks.git
Or "CustomNodePacks" from ComfyUI Manager, then restart. The Magnific family is ported into this pack from Magnific's vendor pack magnific-comfyui 0.7.0, so one install covers them - don't stack the vendor zip on top. Sign in via the Magnific menu or the Magnific Save To node; the session lives at ~/.magnific/comfyui_auth.json, and the node does nothing until you're authenticated.
Should this be your inpaint node?
Sometimes. Local inpainting is genuinely excellent in 2026 - a good fill model or an instruction-editing model handles most jobs, runs for free, and keeps the picture on your disk. The reason to route this one out is when the region is hard: awkward object removal against a busy or textured background is where a hosted pipeline's larger models still earn their per-call cost, and object removal is a task where "it worked on the first try" is worth more than the marginal saving.
Compare before committing. Run your worst five images through both your local inpaint and this node, and you'll know in twenty minutes whether your specific material needs the cloud. The standing caveat applies either way: the image goes to Magnific's servers and their filter decides, so don't send anything you wouldn't upload.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | β | |
| mask | MASK | 1.0/white = area to change. Must be the same pixel size as the image. | |
| mode | COMBO | replace | 2 options: replace, erase |
| prompt | STRING | Replace mode only: what the masked area should become. | |
| folderopt | MAGNIFIC_FOLDER | Optional β from a Magnific Save To node. Not connected β your Personal project. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | β |
| creation_identifier | STRING | β |
| metadata | STRING | β |