Mask Dilate Region
Grow a mask's edges outward so inpaints don't leave a seam
A mask that's pixel-perfect around your subject is usually the wrong mask. Inpaint exactly up to the edge of a segmentation mask and you tend to get a visible seam - the standard fix people reach for is "generous mask overlap... and adequate mask blur" so the edit has room to blend rather than snapping shut on a hard line. Mask Dilate Region is how you get that overlap: it grows the white area outward a bit before you use it, giving the edit margin to feather into.
It's the "pad out" counterpart to Mask Erode Region in the same pack (which shrinks instead of grows), and it sits in the same family as Mask Dominant Region, Mask Smooth Region, and the crop-to-region nodes - WAS's whole toolkit for cleaning up a mask before it does real work.
How it works
Mechanically this is standard morphological dilation: every white pixel's neighborhood expands outward, so thin gaps close up and the overall white region gets bigger and rounder. It doesn't care what created the mask - a hand-drawn one, a SAM segmentation, a color threshold - it just expands whatever white region it's handed. Run it too aggressively and it'll eat into detail you wanted to keep, or merge two regions that should've stayed separate, so it's worth previewing the mask after dilation rather than trusting the number blind.
What it takes and gives back
It's a mask-in, mask-out node: feed it a MASK, tell it how far to grow the boundary, and it hands back a MASK with the white region expanded by that amount. That output is a drop-in replacement for whatever mask you were about to use - wire it straight into your inpainting node, a crop node, or a mask blend, in place of the original.
How to install it
Through ComfyUI Manager: search "WAS Node Suite" and install, or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/WASasquatch/was-node-suite-comfyui
then, from inside that folder, path/to/ComfyUI/python_embeded/python.exe -s -m pip install -r requirements.txt on a portable build (or plain pip install -r requirements.txt on a system Python install). Restart ComfyUI; the mask tools live under the WAS Suite menu.
Common issues & troubleshooting
The pack has been in maintenance-only mode since the author marked it retired in December 2023 - this particular node is simple, standard image morphology, so it's unlikely to break on its own, but the suite as a whole can fail to import after a ComfyUI update. If you see "Import Failed" for the whole pack rather than something specific to this node, that's the known issue: a ComfyUI upgrade can downgrade a shared dependency WAS pins for older support (BLIP was the example the author gave), and the mismatch takes the whole module down with it. Re-running the requirements install with your embedded Python interpreter - not a system one - is the fix that's worked for people stuck on this.
If the mask looks unchanged after dilating, double-check you're actually looking at the node's output and not the original mask still connected elsewhere in the graph - an easy mistake when you're iterating quickly with a mask preview node. And if two nearby regions merge into one where you didn't want them to, that's dilation doing exactly what it's supposed to; back off the amount rather than fighting it downstream.
Inputs (0)
No inputs
Outputs (0)
No outputs