𝙆 Mask Blur +
Soften and grow a mask without leaving the graph
- mask
- MASK
A hard-edged mask is almost never what you actually want going into an inpaint or a composite - you get a visible seam where the mask boundary was. Mask Blur + is KayTool's answer: one node that both blurs the edge and grows or shrinks the mask itself, so you're not chaining a separate blur node and a separate grow/erode node just to get a mask that feathers into the image properly.
It lives under the pack's KayTool/Mask category, which is a small cluster of mask utilities (this one, a mask filler, a couple of preview nodes) sitting alongside the rest of KayTool's grab-bag of image and translation helpers.
How it works
Blur uses a Gaussian blur - the standard choice for softening a mask edge without introducing hard artifacts. Expand handles the sizing: positive values grow the mask outward (covering a bit more than the original selection, useful when your source mask is slightly too tight and you want to give an inpaint some breathing room), negative values shrink it inward. Both effects stack on the same mask in one pass.
One thing worth flagging plainly: the expand range here is -5 to 5 in steps of 0.1 - a much narrower dial than you'll find on some other packs' grow-mask nodes, which often work in whole pixels across a wider range. That narrow range suggests this is closer to a relative/fractional adjustment than a literal "expand by N pixels" control. The practical upshot: don't expect 5 to look like the maximum you're used to elsewhere - nudge it in small steps and watch the preview rather than assuming a value that worked in a different node will translate here.
The inputs and output that matter
- mask (MASK) - the mask you're softening.
- blur (INT, 0–256) - Gaussian blur radius. 0 is a no-op if you only want the expand behavior.
- expand (FLOAT, -5 to 5, step 0.1) - grow (positive) or shrink (negative) the mask.
- invert_mask (BOOLEAN) - flips 0↔1 on the mask values before processing, per the node's own tooltip. Handy if a mask you're feeding in has foreground/background backwards for what you need downstream.
- MASK (output) - the processed mask, ready for an inpaint node, a composite, or a preview node.
Installing it
Install the whole pack, not just this node: ComfyUI Manager → search KayTool → install → restart. Or manually: cd ComfyUI/custom_nodes && git clone https://github.com/kk8bit/KayTool, restart. It's the same repo behind the pack's better-known features (the node-alignment toolbar and resource monitor are what most people actually install KayTool for - a real "can't live without this pack" thread on r/comfyui led with it), so you'll get a lot of unrelated UI tooling along with this mask node.
Common issues
Because the blur radius tops out at 256, extremely large or high-resolution masks may need more blur than the slider offers if you want a very soft, wide feather - in that case chaining a second blur pass (or using a different node with a wider range for that specific case) is the workaround. The expand control being fine-grained (0.1 steps, capped at 5) is the thing most people trip on coming from other mask nodes: if you crank it expecting a dramatic grow and nothing visibly changes, you're not doing anything wrong, the range is just narrower than you'd expect - increase in small increments and check the mask preview rather than the underlying image. And as with any mask op: feed this a mask that's actually the shape you think it is first (preview it before this node), since blur and expand both amplify whatever's already wrong with an upstream mask rather than fixing it.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| invert_mask | BOOLEAN | false | Invert mask values (0->1, 1->0) |
| mask | MASK | — | |
| blur | INT | 00–256 | — |
| expand | FLOAT | 0.0-5–5 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MASK | MASK | — |