Mask Morph [DEPRECATED] β‘π ‘π π £π
Animate erode/dilate/open/close over time (deprecated)
- masks
- MASK
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, orclose.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.
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| masks | MASK | Input mask or sequence of masks to be processed (MASK type) | |
| strength | FLOAT | 1.000β1 | Overall strength of the mask effect (0.0 to 1.0) |
| invert | BOOLEAN | false | When enabled, inverts the mask output (black becomes white and vice versa) |
| subtract_original | FLOAT | 0.000β1 | Amount of the original mask to subtract from the result (0.0 to 1.0) |
| grow_with_blur | FLOAT | 0.00β10 | Amount of Gaussian blur to apply for mask growth (0.0 to 10.0) |
| start_frame | INT | 00β1000 | Frame number where the effect begins (0 to 1000) |
| end_frame | INT | 00β1000 | Frame number where the effect ends (0 to 1000, 0 means until end) |
| effect_duration | INT | 00β1000 | Number of frames over which the effect is applied (0 to 1000, 0 means full range) |
| temporal_easing | COMBO | Controls how the effect strength changes over time ('ease_in_out', 'linear', 'bounce', 'elastic', 'none') | |
| palindrome | BOOLEAN | false | When enabled, the effect plays forward then reverses within the specified duration |
| morph_type | COMBO | Type of morphological operation ('erode', 'dilate', 'open', 'close') | |
| max_kernel_size | INT | 53β21 | Maximum size of the morphological kernel (3 to 21, odd numbers only) |
| max_iterations | INT | 101β50 | Maximum number of times to apply the operation (1 to 50) |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MASK | MASK | β |