Nodes/RyanOnTheInside/Mask Morph [DEPRECATED] βš‘πŸ…‘πŸ…žπŸ…£πŸ…˜
ComfyUI Node

Mask Morph [DEPRECATED] βš‘πŸ…‘πŸ…žπŸ…£πŸ…˜

Animate erode/dilate/open/close over time (deprecated)

By ryanontheinsideΒ·Created 2 years agoΒ·Updated 5 months agoΒ· 852
Mask Morph [DEPRECATED] βš‘πŸ…‘πŸ…žπŸ…£πŸ…˜
  • masks
  • MASK
β—„strength1.00β–Ί
β—„invertfalseβ–Ί
β—„subtract_original0.00β–Ί
β—„grow_with_blur0.0β–Ί
β—„start_frame0β–Ί
β—„end_frame0β–Ί
β—„effect_duration0β–Ί
β—„temporal_easingβ–Ύβ–Ί
β—„palindromefalseβ–Ί
β—„morph_typeβ–Ύβ–Ί
β—„max_kernel_size5β–Ί
β—„max_iterations10β–Ί

Say it up front, because the pack does: this node's own display name carries a [DEPRECATED] tag. That's the author's own labeling, not a guess on my part. If you're starting a new workflow, check ComfyUI Manager's node list for whatever replaced it in this pack before you build around this one - deprecated nodes in active packs tend to get quietly superseded rather than removed, so an updated equivalent likely exists even if it isn't in the batch covered here.

With that said, here's what it does, because plenty of existing workflows still use it. It's a mask processor that runs classic morphological operations - erode, dilate, open, close - but wraps them in a full time-based animation envelope, so the effect can ramp in, hold, and ramp back out across a frame range instead of applying uniformly to every frame.

How it works

morph_type picks the operation: erode shrinks the masked region, dilate grows it, open (erode then dilate) removes small noise/specks, close (dilate then erode) fills small gaps. max_kernel_size and max_iterations control how aggressive the operation gets at full strength. Everything else on this node is about when and how much that operation applies: start_frame/end_frame bound the range it's active in, effect_duration controls how many frames the ramp takes, and temporal_easing (ease_in_out, linear, bounce, elastic, none) shapes that ramp's curve. palindrome makes the effect play forward then reverse within its duration, for a symmetric grow-then-shrink motion. strength scales the overall effect, invert flips the mask, and subtract_original/grow_with_blur add fine control over how the result blends with the source mask.

The inputs that matter

  • masks - the mask sequence to process.
  • morph_type - erode, dilate, open, or close.
  • strength (0–1) - how strongly the operation applies.
  • start_frame / end_frame / effect_duration / temporal_easing / palindrome - the animation envelope.

Output is a single MASK.

How to install it

The pack's README came back empty for install specifics, so use the standard path:

ComfyUI Manager: search "RyanOnTheInside", install, restart.

Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/ryanontheinside/ComfyUI_RyanOnTheInside

Restart ComfyUI afterward.

Troubleshooting

Given the deprecated status, the first troubleshooting step for anything odd is checking whether a newer node in the same Masks area of the pack covers the same ground with fewer surprises. Beyond that: if the effect isn't visible at all, check start_frame/end_frame - leaving end_frame at its default of 0 can mean "until the end," so if you expected a bounded window and got the whole sequence (or vice versa), that's the first place to look. max_kernel_size only accepts odd numbers (3–21) since morphological kernels need an odd size to have a center pixel - if you're scripting values into this node rather than using the slider, an even number will misbehave.

CategoryRyanOnTheInside/Masks/TemporalMasks

Inputs (13)

NameTypeDefaultDescription
masksMASKInput mask or sequence of masks to be processed (MASK type)
strengthFLOAT1.000–1Overall strength of the mask effect (0.0 to 1.0)
invertBOOLEANfalseWhen enabled, inverts the mask output (black becomes white and vice versa)
subtract_originalFLOAT0.000–1Amount of the original mask to subtract from the result (0.0 to 1.0)
grow_with_blurFLOAT0.00–10Amount of Gaussian blur to apply for mask growth (0.0 to 10.0)
start_frameINT00–1000Frame number where the effect begins (0 to 1000)
end_frameINT00–1000Frame number where the effect ends (0 to 1000, 0 means until end)
effect_durationINT00–1000Number of frames over which the effect is applied (0 to 1000, 0 means full range)
temporal_easingCOMBOControls how the effect strength changes over time ('ease_in_out', 'linear', 'bounce', 'elastic', 'none')
palindromeBOOLEANfalseWhen enabled, the effect plays forward then reverses within the specified duration
morph_typeCOMBOType of morphological operation ('erode', 'dilate', 'open', 'close')
max_kernel_sizeINT53–21Maximum size of the morphological kernel (3 to 21, odd numbers only)
max_iterationsINT101–50Maximum number of times to apply the operation (1 to 50)

Outputs (1)

NameTypeDescription
MASKMASKβ€”