Float List To Dilate Mask Schedule | Akatz
Generate a dilation schedule string straight from your data
- STRING
Float List To Dilate Mask Schedule turns a list of per-frame float values into the schedule-string format that Dilate Mask Linear Infinite expects. It's the bridge between "data I have" (audio amplitudes, brightness scores, keyframe outputs) and "string that node will parse."
Hand-writing a dilation schedule - (start, speed, (r, g, b)), tuples - is miserable once it gets past a couple of entries, and it never lines up with real data you've computed. This node does the authoring for you: it walks your float list, decides per frame whether the value clears a threshold, and emits the segments as a schedule string with the colors you specified. Wire that string straight into Dilate Mask Linear Infinite and your mask grows exactly where the data says it should.
How it works
In the source it's a small state machine over the list. A running "dilating?" flag toggles on when a value crosses the threshold, toggles off when it drops back, and each on-run is emitted as one schedule segment: the frame it started, the dilation_speed, and the next color in your mask_colors list (cycling when you run out). So a binary on/off pattern becomes a series of colored dilation bursts - each color marking a separate "event" in your data. The output is a STRING, ready to paste or wire into the dilation node.
Inputs
float_list- the per-frame values (defaultInput, so it's meant to be wired from a schedule/amplitude source).mask_colors- colors in(r, g, b), (r, g, b)format; defaults to yellow and magenta.threshold- the cutoff for "on," default 0.5.dilation_speed- pixels per frame for each generated segment, default 30.
Output is a STRING - the dilation schedule. That's it.
Installing it
Part of akatz-ai/ComfyUI-AKatz-Nodes. Install via ComfyUI Manager (search "AKatz") or:
cd ComfyUI/custom_nodes
git clone https://github.com/akatz-ai/ComfyUI-AKatz-Nodes
cd ComfyUI-AKatz-Nodes
pip install -r requirements.txt
Restart ComfyUI. No model downloads; requirements are numpy, torch, opencv-python and pydub.
Common issues
If the output schedule is empty or one giant run, your threshold is wrong for the data - check the range of the float list (a 0–1 list needs a 0–1 threshold; a 0–100 list doesn't). Also note each emitted segment applies a single dilation_speed and the colors cycle in order, so if your data has more on-runs than colors, colors repeat - which can be visually confusing if you were counting on unique colors per event. This is the cleanest path into the schedule-driven dilation workflow, so if you're doing audioreactive or data-driven mask reveals, this is the node to learn first.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| float_list | FLOAT | — | |
| mask_colors | STRING | (255, 255, 0), (255, 0, 255) | — |
| threshold | FLOAT | 0.500–1 | — |
| dilation_speed | INT | 30 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |