Create Watermark Removal Mask
Corner masks for cleanup passes
- Mask
Watermarks live in the corners. This node knows that, so instead of making you paint a mask over each one, it generates rectangular masks in whichever corners you flag - top-left, top-right, bottom-left, bottom-right - sized to cover the mark. You then hand that mask to an inpainting or object-removal node (the readme points at comfyui-lama-remover) and let it repaint the covered area clean.
The reason it's a dedicated node and not just "draw a rectangle" is convenience at scale. If you're cleaning a batch of images that all have the same corner watermark, a parametric corner-mask generator means you set it once and it applies to everything, rather than hand-masking each frame. It's a small quality-of-life node for a specific, repetitive chore.
How it works
You give it the canvas size and a mask size, then toggle which corners you want covered. It stamps a Mask_W × Mask_H rectangle into each enabled corner, keeps a configurable margin from the very edge, and outputs the combined mask. One nice guard: if you accidentally disable all four corners, it defaults to enabling the bottom-right one rather than handing you an empty mask.
The inputs that matter
- C_Width / C_Height - the canvas dimensions; match your image.
- Mask_W / Mask_H - the size of each corner mask. Note the cap: each can't exceed half the canvas dimension, which keeps the corners from overlapping into one big blob.
- Top_L / Top_R / Bottom_L / Bottom_R - the corner toggles. Enable the corner(s) your watermark actually sits in. Bottom-left is on by default; the rest are off.
- EdgeToEdge - how many pixels to preserve at the very outermost edge (0–16). Keeping a small border prevents edge noise from the removal pass bleeding in; set it to 0 for a truly borderless mask.
- Intenisity - mask strength, 0 to 1 (the label's misspelled but it's the intensity); 1.0 for a solid mask.
- Blur - feathers the mask edge so the repaint blends rather than leaving a hard patch.
Output is a single Mask.
Where it fits
This is a mask generator, not a remover - it produces the "where," and something downstream does the "how." Wire the Mask into a LaMa-style inpainter or any inpaint node, with the original image, and the flagged corners get repainted. A little Blur helps the repainted patch merge with its surroundings instead of showing a seam.
Install
ComfyUI Manager → search ComfyUI_Mira → Install → restart, or cd ComfyUI/custom_nodes && git clone https://github.com/mirabarukaso/ComfyUI_Mira.git and restart. If the pack errors on load, run pip install -r requirements.txt in its folder. The node makes no model download - but the removal node you pair it with (e.g. a LaMa remover) will have its own model to fetch.
Common issues
If the watermark isn't getting covered, the mask is probably in the wrong corner or too small - check that the right Top_*/Bottom_* toggle is on and that Mask_W/Mask_H actually spans the mark. If the removal leaves a visible rectangular patch, raise Blur so the edge feathers, and consider a small EdgeToEdge margin to avoid dragging edge noise inward. And remember the half-canvas cap on mask size - if you need to cover something bigger than a corner, this isn't the node for it; use a general mask node instead.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| C_Width | INT | 5128–4096 | — |
| C_Height | INT | 5128–4096 | — |
| Mask_W | INT | 5128–4096 | — |
| Mask_H | INT | 5128–4096 | — |
| Top_L | BOOLEAN | false | — |
| Top_R | BOOLEAN | false | — |
| Bottom_L | BOOLEAN | true | — |
| Bottom_R | BOOLEAN | false | — |
| EdgeToEdge | INT | 10–16 | — |
| Intenisity | FLOAT | 1.00–1 | — |
| Blur | FLOAT | 0.0 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| Mask | MASK | — |