Flex Mask Opacity β‘π ‘π π £π
A reactive volume knob for a mask's overall strength
- masks
- opt_feature
- MASK
This is the simplest node in the Flex mask family, and that's exactly its use case: a single knob that caps how strong a mask is allowed to get, with the option to let that cap move over time instead of sitting fixed. Think of it as a volume control for a mask's visibility rather than anything that reshapes it.
How it works
max_opacity sets a ceiling on the mask's output strength - the mask's own values get scaled so nothing exceeds that cap. On its own that's not much more than a strength multiplier, but wire in an opt_feature and set feature_param to max_opacity, and the ceiling itself can rise and fall with an audio or motion signal - a mask that fades in and out with a beat, or dims and brightens with scene brightness, without you hand-keyframing a single value. feature_mode decides whether that modulation is relative (nudging around your set ceiling) or absolute (scaling from zero up to it), and feature_threshold gates how strong the incoming feature has to be before it's allowed to move anything at all.
Inputs and outputs that matter
masks(required,MASK) - the mask to scale.max_opacity(default 1, 0β1) - the ceiling on the mask's output strength.opt_feature(optional,FEATURE) - connect to let the ceiling pulse over time.- 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. Pure scaling math - no models involved.
Common issues & troubleshooting
Mask barely visible even at max_opacity 1. If your source mask's own values never reach full white to begin with, capping at 1 won't brighten it - this node only ever scales down, it can't push a mask brighter than its own source values. If you need it stronger than that, look upstream at whatever produced the mask, or layer FlexMaskBinary first for a hard cutoff instead.
Feature-driven pulsing looks flat. Check feature_mode - relative centers the modulation around your set max_opacity, so if that value is already near 1, there's little headroom left for the feature to push it any higher; try absolute if you want the full range from zero to your ceiling to be in play.
Reactivity seems inert. As with every Flex mask node, confirm feature_param is actually set to max_opacity and not left on None - a connected opt_feature with no target parameter does nothing.
Inputs (11)
| 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: - opacity: Dynamically adjust the mask opacity - 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) |
| max_opacity | FLOAT | 1.000β1 | Maximum opacity to apply to the mask (0.0 to 1.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 | β |