Nodes/ComfyUI Batch BBox Detector/Audio Reactive Transform
ComfyUI Node

Audio Reactive Transform

Make your video move with the music — the whole point of this pack

By rslosh·Created 11 months ago·Updated 5 months ago· 1
Audio Reactive Transform
  • image
  • audio_weights
  • background_image
  • mask
  • image_batch
  • frame_count
scale_min1.00
scale_max1.50
rotation_min0
rotation_max15
opacity_min0.30
opacity_max1.00

Audio Reactive Transform is the marquee node of NodeSweet's audio half, and it's what the pack's example workflow is built around. You feed it one foreground image, a list of FLOATS audio weights, and it returns a whole batch of frames - one per weight - with the image scaled, rotated, and faded according to how loud the audio is at that moment. Wire that batch into VHS_VideoCombine and you've got a music-reactive video. It's the ComfyUI-native version of a visualizer pattern the community has chased for years, minus the After Effects.

The mechanism is straightforward and entirely CPU-bound. The node takes the first frame of your foreground image, and for each weight in your list it normalizes the weights to [0,1], then interpolates three parameters between their min/max bounds: scale (scale_minscale_max, default 1.0→1.5), rotation (rotation_minrotation_max, default 0→15 degrees), and opacity (opacity_minopacity_max, default 0.3→1.0). Each frame gets an inverse-mapping affine transform (bilinear, pure numpy) and is composited over the background.

The optional inputs are where it gets flexible:

  • background_image - a static image to composite the transforming foreground over. The classic setup is white text over a photo.
  • mask - controls which pixels of the foreground get transformed, e.g. isolating white text from a photo. Pass a MASK and only the masked region animates; without it, the whole foreground transforms.

Outputs are image_batch (an IMAGE tensor, one frame per audio weight - keep the order, it matches the music) and frame_count (an INT, just len(audio_weights), handy for driving anything that needs to know the length).

The full flow from the pack's own audio_reactive_mask_video.json: Load Audio → Audio Analysis → AudioWeightsRemap → AudioReactiveTransform → VHS_VideoCombine. AudioWeightsRemap is worth including - raw weights are spiky, and a little smoothing there saves you from a jittery result here.

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. The node is pure numpy/PyTorch - no models, no downloads. (The example workflow itself references Load Audio Separation Model and an Audio Analysis node, which come from other packs - install those if you load it as-is.)

Where people get burned: this is a per-frame CPU affine transform, and it adds up. A 300-frame batch at 1080p will make you wait; keep the foreground small if you can. Also remember only image[0] is used - if you wire in a batch of images expecting all of them to animate, you're getting the first frame only. And set expectations on "audio reactive": most of the jaw-dropping stuff posted online is AE editing, not a node graph. This node does one honest thing - beat-driven scale, rotation, and fade - and it does it cleanly.

Categorynodesweet-hellorob

Inputs (10)

NameTypeDefaultDescription
imageIMAGE
audio_weightsFLOATS
scale_minFLOAT1.000.1–5
scale_maxFLOAT1.500.1–5
rotation_minFLOAT0-360–360
rotation_maxFLOAT15-360–360
opacity_minFLOAT0.300–1
opacity_maxFLOAT1.000–1
background_imageoptIMAGE
maskoptMASK

Outputs (2)

NameTypeDescription
image_batchIMAGE
frame_countINT