ComfyUI Node

Audio Weights Remap

Shaping your audio weights

By rslosh·Created 11 months ago·Updated 5 months ago· 1
Audio Weights Remap
  • audio_weights
  • remapped_weights
power1.0
smoothing1
invertfalse

Audio Weights Remap is the tone-shaping stage of NodeSweet's audio-reactive pipeline. Raw audio analysis output - FFT energy, onset values, whatever your "Audio Analysis" node spits out as FLOATS - is almost never good to animate with directly. It's spiky, it's jumpy, and it responds to everything equally. This node takes those weights and runs them through a three-stage makeover: normalize, shape with a power curve, then smooth. The output (remapped_weights, also FLOATS) is what you actually want to feed a transform node, because it's the difference between a graphic that trembles and one that pulses with the beat.

The three controls map to three instincts every audio-visualizer builder has:

  • power (0.1–5.0, default 1.0) - the response curve. Above 1, quiet parts get quieter and peaks get spikier - punchier, more percussive motion. Below 1, everything compresses toward a middle ground - softer, rounder motion. Default 1.0 is a no-op. This is the control you'll actually fiddle with.
  • smoothing (1–30, default 1) - a moving average over that many samples. 1 is no smoothing. 5–10 kills most frame-to-frame jitter so the motion feels like it's holding a note rather than vibrating. Too high and it lags the beat, so keep it below the frame-rate region you care about.
  • invert (boolean, off) - flips the waveform, quiet becomes loud and vice versa. Handy when your analysis node reports energy inverted, or when you want the pauses to be the dramatic moments.

Mechanically it's numpy all the way: normalize to [0,1], raise to power, convolve with a box filter for smoothing, renormalize, optionally invert. All CPU, all fast, nothing to download. It's a pure float-list transform, so it composes anywhere - not just the pack's own AudioReactiveTransform, but any node that eats FLOATS.

The full NodeSweet audio flow looks like this (and there's an example workflow, audio_reactive_mask_video.json, shipped in the repo): Load Audio → Audio Analysis → AudioWeightsRemap → AudioReactiveTransform → VHS_VideoCombine. Weights come in raw from analysis, get shaped here, and drive per-frame scale/rotation/opacity in the transform node.

Install is the pack default - ComfyUI Manager, search "Batch BBox Detector", Install, or:

cd ComfyUI/custom_nodes && git clone https://github.com/rslosch/comfyui-nodesweet

then restart. Zero extra dependencies; it's pure numpy.

One honest framing: "audio reactive" is a big, well-worn idea in the community - 300+ threads over the years - and most of the flashy examples you see are After Effects, not AI. NodeSweet's approach is the ComfyUI-native version of it, and AudioWeightsRemap is where the "is this going to look musical or broken" decision actually gets made. Start with smoothing around 5 and power around 1.3, then tune to the track. If the motion still feels random, the problem is usually upstream - your analysis node - not this one.

Categorynodesweet-hellorob

Inputs (4)

NameTypeDefaultDescription
audio_weightsFLOATS
powerFLOAT1.00.1–5
smoothingINT11–30
invertBOOLEANfalse

Outputs (1)

NameTypeDescription
remapped_weightsFLOATS