Flex Mask Interpolate β‘π ‘π π £π
Blend two masks with real easing curves
- masks
- mask_b
- opt_feature
- MASK
A linear crossfade between two masks is fine until it isn't - a hard edge that eases in feels more natural than one that snaps or ramps at a constant rate, and a radial reveal reads completely differently from a straight blend. Flex Mask Interpolate gives you both: a real set of interpolation curves to blend masks toward mask_b, plus (like the rest of this pack's Flex family) an optional FEATURE input so the blend amount itself can move with audio or motion instead of sitting at a fixed value.
How it works
interpolation_method is the core choice - nine options ranging from the expected (linear, ease_in, ease_out, ease_in_out, cubic, sigmoid) to the more visually distinct (radial, which interpolates outward from a center point rather than uniformly; distance_transform, which blends based on distance from the mask's edges rather than a flat time curve; and random_noise, which breaks the transition up with noise instead of a clean gradient). max_blend caps how far the interpolation can go - 1.0 lets it fully reach mask_b, lower values hold back some of the original. blend_mode (normal, add, multiply, overlay, soft_light) then determines how the two masks actually combine once the interpolation weight is computed, and invert_mask_b flips the second mask before any of that happens.
Layered underneath is the same general mask toolkit you'll see across this pack's Flex mask nodes: invert flips the final output, subtract_original peels back a portion of the source mask after blending, and grow_with_blur softens or expands edges. mask_strength scales the overall effect independently of max_blend.
Inputs and outputs
masks(required,MASK) - the base mask or sequence.mask_b(required,MASK) - the second mask to interpolate toward.interpolation_method- the curve shape, the setting that actually defines the character of the transition.opt_feature(optional,FEATURE) - drives the blend reactively if connected; otherwise the transition is fixed.- Output - a single
MASK.
One thing worth knowing before you rely on the feature input
The feature_param dropdown on this node - the setting that's supposed to pick which parameter the feature modulates - currently only exposes a placeholder value in its schema rather than a real option like max_blend. In practice, that means feature-driven modulation on this specific node isn't fully wired up the way it is on its sibling Flex nodes. The deterministic side (everything not touching opt_feature) works exactly as described above; if you were counting on this one to react to audio the same way Flex Image Posterize or Flex Mask Morph do, test it before building a workflow around that assumption.
Installing it
Install via ComfyUI Manager (search RyanOnTheInside) or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/ryanontheinside/ComfyUI_RyanOnTheInside
Then pip install -r requirements.txt and restart ComfyUI. No unusual dependency for this specific node beyond the pack's standard image/mask stack.
Common issues
Beyond the feature_param gap above, the most common surprise is interpolation_method mattering far more than max_blend - people dial in max_blend expecting to control the look, when it's actually interpolation_method that decides whether the transition looks like a fade, a radial wipe, or a noisy dissolve. If the blend looks flat or unremarkable, try radial or distance_transform before assuming the node isn't doing anything interesting.
Inputs (15)
| Name | Type | Default | Description |
|---|---|---|---|
| strength | FLOAT | 1.000β1 | Overall strength of the feature modulation (0.0 to 1.0) |
| feature_threshold | FLOAT | 0.000β1 | Threshold for feature activation (0.0 to 1.0) |
| feature_param | COMBO | Choose which parameter to modulate: - max_blend: Dynamically adjust blend amount - None: No parameter modulation | |
| feature_mode | COMBO | relative | How to apply the feature modulation: - relative: Changes are centered around the original value - absolute: Changes scale directly from zero to the maximum |
| masks | MASK | Input mask or sequence of masks to be processed (MASK type) | |
| 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) |
| mask_strength | FLOAT | 1.000β1 | Overall strength of the mask effect (0.0 to 1.0) |
| mask_b | MASK | Second mask to interpolate with (MASK type) | |
| interpolation_method | COMBO | Method of interpolation ('linear', 'ease_in', 'ease_out', 'ease_in_out', 'cubic', 'sigmoid', 'radial', 'distance_transform', 'random_noise') | |
| max_blend | FLOAT | 1.000β1 | Maximum blend factor between masks (0.0 to 1.0) |
| invert_mask_b | BOOLEAN | false | Whether to invert the second mask before interpolation |
| blend_mode | COMBO | Method for blending masks ('normal', 'add', 'multiply', 'overlay', 'soft_light') | |
| opt_featureopt | FEATURE | Optional feature input for modulation Connect any feature node here to control the effect. Features can come from audio, motion, color, or other sources. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MASK | MASK | β |