AudioWeights to FadeMask π€
The tiny node that turns audio levels into a FadeMask string
- fade_mask_string
Every audio-reactive workflow has the same awkward step: you've analyzed the track and you've got per-frame numbers, but the node that applies them wants them as text. That's the gap this node fills. It takes a float or a list of floats - your audio weights, one per frame - and renders them into the index:(value), format a FadeMask-style consumer expects. Nothing else happens. No analysis, no API call, no model. It is pure formatting, and it's the kind of glue you only notice when it's missing.
How it works
The input is a single audio_weights field, typed FLOAT with forceInput - meaning it arrives over a wire, not by typing. Feed it one float and you get one line: 0:(0.42),. Feed it a list of floats and each becomes a line, index in order:
0:(0.42),
1:(0.10),
2:(0.87),
The output fade_mask_string is a STRING, so it plugs straight into whatever downstream node eats FadeMask text - the per-frame mask or strength driver in your audio-reactive graph. That ecosystem is small but real; this pack's sibling node Peaks Weights Generator exists to feed the same style of audio-driven weighting (it's explicitly aimed at the Yvann Nodes suite, the de-facto standard for this niche in r/comfyui).
Inputs and outputs
Just the two that matter:
audio_weights(FLOAT) - the per-frame weight or list you want formatted. Wire it from your audio analysis node.fade_mask_string(STRING) - the formatted output.
Note the trailing comma on every line. That's the format the consumer expects, not a bug - don't strip it.
Installing the pack
This ships in ComfyUI-RobeNodes. Easiest is ComfyUI Manager: search "Robe Nodes" and install. Or the manual route:
cd ComfyUI/custom_nodes
git clone https://github.com/RobeSantoro/ComfyUI-RobeNodes
Then restart ComfyUI. The pack's requirements.txt pulls opencv-python, google-genai, piexif, and requests - heavier than this node needs, but Manager installs them in one shot. No models to download.
Where people get burned
The forceInput on audio_weights is the main confusion - you can't just type a number in, you have to wire something in (right-click the widget and convert it, or drop a Primitive/Float node). And if you manage to hand it an unexpected type, the code quietly returns an empty string and prints a warning to the console. If your FadeMask output comes back blank, check what's actually on that wire first.
It's a ten-line node and proud of it. In a full audio-reactive pipeline it's the difference between hand-formatting 250 lines of weights and getting them for free.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| audio_weights | FLOAT | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| fade_mask_string | STRING | β |