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

Flex Mask Voronoi Scheduled βš‘πŸ…‘πŸ…žπŸ…£πŸ…˜

Cracked-cell mask patterns, animated and reactive

By ryanontheinsideΒ·Created 2 years agoΒ·Updated 5 months agoΒ· 852
Flex Mask Voronoi Scheduled βš‘πŸ…‘πŸ…žπŸ…£πŸ…˜
  • masks
  • opt_feature
  • MASK
β—„strength1.00β–Ί
β—„feature_threshold0.00β–Ί
β—„feature_paramβ–Ύβ–Ί
β—„feature_moderelativeβ–Ί
β—„invertfalseβ–Ί
β—„subtract_original0.00β–Ί
β—„grow_with_blur0.0β–Ί
β—„mask_strength1.00β–Ί
β—„distance_metricβ–Ύβ–Ί
β—„scale1.0β–Ί
β—„detail100β–Ί
β—„randomness1.0β–Ί
β—„seed0β–Ί
β—„x_offset0.0β–Ί
β—„y_offset0.0β–Ί
β—„formulaβ–Ύβ–Ί
β—„a1.0β–Ί
β—„b1.0β–Ί

Voronoi diagrams - the cracked-glass, cell-boundary pattern you get from scattering points and coloring each pixel by which point it's closest to - are a classic procedural-texture building block, and this is the most parameter-dense node in the pack's mask family. It's not modifying your input mask so much as generating a whole cellular pattern from scratch, with nearly every knob available for reactive control.

How it works

scale, detail (cell count), randomness, and seed control the base cell layout - more detail means more, smaller cells; higher randomness moves cell centers away from a perfectly regular grid toward something organic; seed picks which specific random layout you get. x_offset/y_offset pan the whole pattern. distance_metric is where this node gets genuinely unusual: alongside the standard euclidean, manhattan, chebyshev, and minkowski distance functions, it also ships five decorative "kaleidoscope" metrics (kaleidoscope_star, kaleidoscope_wave, and three kaleidoscope_radiation variants) that warp the cell shapes into starburst and radial patterns instead of plain polygons - someone clearly had fun with this one, and it's worth actually trying a few before settling on euclidean out of habit.

The formula/a/b trio is specific to this node: formula (Linear, Quadratic, Cubic, Sinusoidal, Exponential) shapes the curve used to map your feature's value onto whichever parameter feature_param is targeting, with a and b as the two tunable constants for that curve. That gives you seven things a FEATURE can drive - scale, detail, randomness, seed, x_offset, y_offset, or none - each shaped by a non-linear response curve instead of a flat linear mapping, which is more control than any other node in this batch exposes.

Inputs and outputs that matter

  • masks (required, MASK) - the source mask this pattern is generated against.
  • distance_metric - 10 options, from standard Euclidean/Manhattan through the kaleidoscope variants.
  • scale, detail, randomness, seed, x_offset, y_offset - the pattern's layout controls.
  • formula, a, b - the response curve shaping any feature modulation.
  • opt_feature (optional, FEATURE) - drives whichever parameter feature_param selects.
  • 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 pattern generation - no model downloads.

Common issues & troubleshooting

Pattern looks like noise, not clean cells. High randomness values (up to 5.0) push cell placement well past "organic" into genuinely chaotic - if you wanted a recognizable Voronoi look rather than static, pull it back toward 1.0 or lower.

Kaleidoscope metrics produce unexpected shapes. That's expected - they deliberately distort cell boundaries away from plain polygons into star/wave/radial forms. If you want a standard cracked-glass look, stick with euclidean; reach for the kaleidoscope options when you specifically want that decorative distortion.

Feature modulation feels too extreme or too subtle. Before touching strength or feature_threshold, check formula/a/b - an Exponential or Cubic curve with aggressive a/b values will make small feature changes swing a parameter hard near one end of its range, which can look "broken" when it's actually the curve shape doing exactly what you set it to do.

CategoryRyanOnTheInside/FlexFeatures/Targets/Masks

Inputs (20)

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: - scale: Dynamically adjust cell size - detail: Dynamically adjust number of cells - randomness: Dynamically adjust cell randomness - seed: Dynamically change pattern - x_offset: Dynamically adjust horizontal position - y_offset: Dynamically adjust vertical position - 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)
distance_metricCOMBOMethod used to calculate distances in the Voronoi diagram
scaleFLOAT1.00.1–10Base scale of the Voronoi cells (0.1 to 10.0)
detailINT10010–1000Number of Voronoi cells (10 to 1000)
randomnessFLOAT1.00–5Degree of randomness in cell placement (0.0 to 5.0)
seedINT00–18446744073709550000Random seed for reproducible results
x_offsetFLOAT0.0-1000–1000Horizontal offset of the Voronoi pattern (-1000.0 to 1000.0)
y_offsetFLOAT0.0-1000–1000Vertical offset of the Voronoi pattern (-1000.0 to 1000.0)
formulaCOMBOMathematical formula for feature value mapping ('Linear', 'Quadratic', 'Cubic', 'Sinusoidal', 'Exponential')
aFLOAT1.00.1–10First parameter for fine-tuning the chosen formula (0.1 to 10.0)
bFLOAT1.00.1–10Second parameter for fine-tuning the chosen formula (0.1 to 10.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β€”