Masks Add
Merge two masks into one
Masks Add is the union operator for masks. The README lists it as "Mask Add: add masks together" - you give it two masks, it combines them into one that covers everywhere either input did. If mask A is the face and mask B is the hands, Masks Add gives you a single mask over both.
Why you need it
Masks are how you tell the rest of a workflow where to act - where to inpaint, where to composite, where to apply an effect. Real edits rarely fit one neat region. You want to inpaint the eyes and the mouth. You want to protect the subject and the logo. You want to combine a hand-painted mask with an auto-generated one. The moment you have two masks and want them treated as one, you reach for an add. It's plumbing, but it's the plumbing that makes multi-region editing possible, and our inpainting notes treat clean mask composition as the difference between a tidy edit and a smeared one.
WAS gives you the matching set - Mask Subtract (remove B's area from A), Mask Invert, plus region operations like dilate, erode, and smooth. Add is the one you'll grab most, usually alongside a dilate to feather the combined edge.
How it works
Two mask inputs, one mask output. It sums the two masks pixel-for-pixel, so any pixel that was white (selected) in either input is white in the result. Because mask values top out at fully-on, overlapping areas don't "double" - they just stay on. The output is a standard MASK you can pass to a Set Latent Noise Mask, a paste node, a mask-to-image, or any downstream consumer.
Watch for these
- Same dimensions. The two masks need to line up. Adding a 512×512 mask to a 768×768 one won't align - resize so they match first, or you'll get a misregistered result.
- Add is a union, not a blend. If you wanted the overlap of two masks (intersection) rather than the combination, that's a different operation - Add isn't it. And if you wanted to cut one region out of another, that's Mask Subtract.
- Edges stay hard. Add doesn't feather the seam between the two regions. If the combined mask needs a soft edge, run it through a smooth/dilate/gaussian region node afterward.
Installing it
Part of WAS Node Suite. Install the pack via ComfyUI Manager (search was-node-suite-comfyui, install, restart) or clone it:
cd ComfyUI/custom_nodes
git clone https://github.com/WASasquatch/was-node-suite-comfyui
install requirements.txt, restart. No model files for the mask nodes.
Troubleshooting
The mask math is trivial and doesn't fail; the pack around it can. WAS Node Suite has been unmaintained since December 2023, and the standard problem is the whole suite reporting "Import Failed" after a ComfyUI update - a dependency clash, opencv most often, since WAS pins an older release. Reinstall requirements.txt into the correct venv (activate it, or run install.bat) to reconcile it. After that the mask family loads and behaves.
Inputs (0)
No inputs
Outputs (0)
No outputs