Flex Mask Transform β‘π ‘π π £π
Translate, rotate, or scale a mask, reactively
- masks
- opt_feature
- MASK
A straightforward geometric operation dressed up with the pack's reactivity layer: move a mask around, spin it, or resize it, and let an audio or motion signal drive how far. It's the node to reach for when you want a mask region to visibly pan, rotate, or breathe over a sequence instead of holding still in one spot.
How it works
transform_type picks the operation - translate (move), rotate (spin), or scale (resize) - and max_x_value/max_y_value set the ceiling for how far that transform can go, in either direction (both accept negative values, up to Β±1000). Which one actually matters depends on transform_type: for translate they're your horizontal/vertical movement range, for rotate and scale they likely map onto rotation angle and scale factor respectively rather than literal X/Y position - check which axis moves what once you've picked your transform type. feature_param exposes max_x_value and max_y_value individually, so a FEATURE signal can drive one axis of the transform without touching the other - useful if you want, say, horizontal pan driven by one audio band and vertical drift driven by something else entirely, wired through two chained Flex Mask Transform nodes.
Inputs and outputs that matter
masks(required,MASK) - the mask being transformed.transform_type- translate, rotate, or scale.max_x_value/max_y_value(default 10 each, β1000 to 1000) - the ceiling on how far the transform moves.opt_feature(optional,FEATURE) - drive one axis 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. Straight geometric transform math, no model downloads.
Common issues & troubleshooting
Mask disappears off the edge of frame. With translate ranges up to Β±1000, it's easy to push a mask entirely out of the visible canvas, especially at your source resolution's smaller end. Start with a much lower max_x_value/max_y_value than the defaults suggest and dial up from there.
Rotate or scale doesn't behave like translate did. Since the same two fields (max_x_value/max_y_value) are reused across all three transform types, don't assume their meaning carries over when you switch transform_type - a value that gave you a modest pan under translate might read as a huge rotation angle or scale factor once you switch modes. Reset and re-tune after changing the transform type.
Reactive transform looks jittery. A raw, unsmoothed feature driving position or rotation will read as shaky rather than smooth motion. Smooth the feature signal upstream, or lower feature_threshold's gate, if you want gentler movement instead of an erratic one.
Inputs (13)
| 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: - x_value: Dynamically adjust horizontal transformation - y_value: Dynamically adjust vertical transformation - 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) |
| transform_type | COMBO | Type of transformation ('translate', 'rotate', 'scale') | |
| max_x_value | FLOAT | 10.0-1000β1000 | Maximum horizontal component of the transformation (-1000.0 to 1000.0) |
| max_y_value | FLOAT | 10.0-1000β1000 | Maximum vertical component of the transformation (-1000.0 to 1000.0) |
| 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 | β |