Nodes/RyanOnTheInside/Flex Mask Opacity βš‘πŸ…‘πŸ…žπŸ…£πŸ…˜
ComfyUI Node

Flex Mask Opacity βš‘πŸ…‘πŸ…žπŸ…£πŸ…˜

A reactive volume knob for a mask's overall strength

By ryanontheinsideΒ·Created 2 years agoΒ·Updated 5 months agoΒ· 852
Flex Mask Opacity βš‘πŸ…‘πŸ…žπŸ…£πŸ…˜
  • masks
  • opt_feature
  • MASK
β—„strength1.00β–Ί
β—„feature_threshold0.00β–Ί
β—„feature_paramβ–Ύβ–Ί
β—„feature_moderelativeβ–Ί
β—„invertfalseβ–Ί
β—„subtract_original0.00β–Ί
β—„grow_with_blur0.0β–Ί
β—„mask_strength1.00β–Ί
β—„max_opacity1.00β–Ί

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.

CategoryRyanOnTheInside/FlexFeatures/Targets/Masks

Inputs (11)

NameTypeDefaultDescription
strengthFLOAT1.000–1Overall strength of the feature modulation (0.0 to 1.0)
feature_thresholdFLOAT0.000–1Threshold for feature activation (0.0 to 1.0)
feature_paramCOMBOChoose which parameter to modulate: - opacity: Dynamically adjust the mask opacity - None: No parameter modulation
feature_modeCOMBOrelativeHow to apply the feature modulation: - relative: Changes are centered around the original value - absolute: Changes scale directly from zero to the maximum
masksMASKInput mask or sequence of masks to be processed (MASK type)
invertBOOLEANfalseWhen enabled, inverts the mask output (black becomes white and vice versa)
subtract_originalFLOAT0.000–1Amount of the original mask to subtract from the result (0.0 to 1.0)
grow_with_blurFLOAT0.00–10Amount of Gaussian blur to apply for mask growth (0.0 to 10.0)
mask_strengthFLOAT1.000–1Overall strength of the mask effect (0.0 to 1.0)
max_opacityFLOAT1.000–1Maximum opacity to apply to the mask (0.0 to 1.0)
opt_featureoptFEATUREOptional 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)

NameTypeDescription
MASKMASKβ€”