EmAySee_ Mask Skinnier
Shrink a mask on its narrow axis — a niche tool with a clear job
- mask
- MASK
EmAySee Mask Skinnier takes a mask and makes it, well, skinnier. Specifically: it finds the bounding box of your mask's white pixels and shrinks the mask content along its shorter axis, keeping the longer dimension intact. A portrait-orientation subject mask gets a thinner waistline; a wide band gets a shorter height. It's a "slim the silhouette" tool, not a general erosion.
Where does that get you? It's a prep step for masked workflows where the mask is hugging the subject a little too tight, or where you want a refinement pass to focus on a narrower region. Think of a body-segmentation mask you want to pull in toward the centerline before an inpaint - the classic use is slimming a subject before detail work, which is why the display name leans into the joke. It's niche, but it does one specific thing predictably, and in this pack it rounds out a whole family of mask-shaping nodes (EmAySee_MaskExpandXY, EmAySee_MaskExpandShrinkXY, EmAySee_MaskUnion, EmAySee_MaskUniversalXY) that all live in the same "get the mask exactly right before you sample" niche.
How it works
The implementation is honest about being simple. It finds the bounding box of non-zero mask pixels, measures the two axes, then resizes the mask content along the shorter axis by your percentage, centering the result back inside the original bounding box. Bilinear interpolation does the shrinking, so edges stay soft rather than going crunchy.
The one behavior worth knowing: if the mask's bounding box is roughly square, the "shorter" axis is whichever happens to be smaller, and the result is a mask that's slimmer in that direction. If you have a completely empty mask, the node passes it through untouched instead of erroring - which is the right call for a batch that might contain an occasional blank frame.
The input that matters
Two inputs, one knob:
mask- the MASK you're reshaping.shrink_percentage- a float from 0 to 100, default 33. 0 means no change, 33 squeezes the short axis down by a third, and 100 collapses it to a single-pixel line. Start at the default; you'll quickly find that small values (10–20) are where most real work happens, and anything past 60 starts looking like a pinched cartoon.
The single output is the reshaped MASK. It feeds straight into an inpaint-masked sampler, a MaskUnion for combining, or a MaskUniversalXY if you want to then expand it back out a touch for edge bleed.
Installing it
It's part of the EmAySee pack, which installs like any custom node pack:
# ComfyUI Manager: search "ComfyUI_EmAySee_CustomNodes" and install
# or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/EmAySee/ComfyUI_EmAySee_CustomNodes
Restart ComfyUI afterward. The pack ships no requirements.txt and this node only needs torch, so installation is clean - the only surprise is the ASCII banner the pack prints at startup.
Common issues
The main gotcha is expectations: this is not a uniform mask erosion like a distance-based shrink, so it won't perfectly trace concave shapes inward. Complex masks with holes or multiple disconnected regions get their bounding box squeezed as a whole, which can distort the interior. If you need true geometric erosion, use the max-pooling-based EmAySee_MaskUniversalXY or MaskExpandShrinkXY instead - those do real dilation/erosion per-pixel. Skinnier is the fast, lossy "make it thinner" hammer, and it's great when that's literally what you want.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| mask | MASK | — | |
| shrink_percentage | FLOAT | 33.00–100 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MASK | MASK | — |