Flex Mask Warp β‘π ‘π π £π
Distort a mask's edges with Perlin, radial, or swirl noise
- masks
- opt_feature
- MASK
If you want a mask's edges to look organic and liquid rather than clean and geometric - melting, rippling, distorted glass - this is the node. It pushes your mask's boundary around using classic noise-based warping, the same family of technique behind a lot of procedural texture and displacement effects, then layers the pack's reactive controls on top so the amount of distortion can move with an audio or motion signal.
How it works
warp_type picks the distortion pattern: perlin uses Perlin noise for an organic, cloud-like warp; radial distorts outward/inward from a center point; swirl twists the mask around a center, like a whirlpool. frequency controls the scale of the noise pattern - low frequency gives large, sweeping distortions, high frequency gives fine, busy ripples. max_amplitude caps how far any given point gets pushed. octaves is a Perlin-noise-specific concept: it layers multiple noise passes at different scales on top of each other, adding fractal detail - more octaves means finer texture riding on top of the broad distortion, at the cost of more compute per frame. feature_param can target max_amplitude, frequency, or octaves, so the intensity, scale, or detail level of the warp can all be driven reactively.
Inputs and outputs that matter
masks(required,MASK) - the mask to distort.warp_type- perlin, radial, or swirl.frequency(default 0.1, 0.01β1) - scale of the distortion pattern.max_amplitude(default 30, 0.1β500) - how far points get pushed.octaves(default 3, 1β8) - layered noise detail, for noise-based warps.opt_feature(optional,FEATURE) - drive amplitude, frequency, or octaves reactively.- Output - a single
MASK.
Installing it
Via ComfyUI Manager: search "RyanOnTheInside," install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/ryanontheinside/ComfyUI_RyanOnTheInside.git
cd ComfyUI_RyanOnTheInside
pip install -r requirements.txt
then restart. Procedural noise math, no model downloads.
Common issues & troubleshooting
Warp is barely visible. max_amplitude's range goes up to 500, but the visible effect depends heavily on your mask's resolution - a small amplitude on a high-res mask can look like nothing at all. Push it well above the default before concluding the effect isn't working.
Distortion looks harsh or blocky instead of smooth. Raise octaves for finer, more organic detail layered into the warp - a single octave at high amplitude can look chunky rather than fluid, especially with perlin.
Performance drops on long sequences. More octaves means more noise layers computed per frame; if you're processing a long clip and it's crawling, dropping octaves back down is the first thing to try before assuming something else is wrong.
Inputs (14)
| 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: - amplitude: Dynamically adjust the strength of warping - frequency: Dynamically adjust the scale of warping - octaves: Dynamically adjust the detail level of noise - 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) |
| warp_type | COMBO | Type of warping effect ('perlin', 'radial', 'swirl') | |
| frequency | FLOAT | 0.100.01β1 | Controls the scale of the warping effect (0.01 to 1.0) |
| max_amplitude | FLOAT | 30.00.1β500 | Maximum amplitude of the warping effect (0.1 to 500.0) |
| octaves | INT | 31β8 | For noise-based warps, adds detail at different scales (1 to 8) |
| 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 | β |