Nodes/ComfyUI-Riffusion/Riffusion Audio Batch
ComfyUI Node

Riffusion Audio Batch

Riffusion Audio Batch — the 'same clip, more copies' node nobody reads the docs for

By traugdor·Created 2 years ago·Updated about a year ago· 5
Riffusion Audio Batch
  • audio
  • audio_batch
batch_size1

This is the most honest little node in the pack: it takes one audio clip and hands you a batch of identical copies of it. That's the whole job. Riffusion Audio Batch (class RiffusionToBatchNode) exists because some nodes in ComfyUI - audio-conditioned video generators and a few batching utilities - want an AUDIO input that already carries a batch dimension, and the raw clip coming out of RiffusionNode is a single element. This is the adapter that makes the shapes line up.

When you'd actually reach for it

If you're running the standard Riffusion setup - spectrogram in, audio out, feed it to a video model - you'll likely never touch this node, and that's fine. It earns its keep when a downstream node expects a batch: pairing one generated phrase with a batch of frames, or feeding a model that processes N audio copies and averages them. Just know what it does not do: it won't give you distinct audio per batch slot. batch_size of 8 means eight copies of the same clip, not eight different clips. If that's what you needed, you've got the wrong node - this is a shape-conversion utility, not a music generator.

How it works

The mechanism is a one-liner: the node takes your audio dict (waveform + sample_rate), repeats the waveform along the batch axis with waveform.repeat(batch_size, 1, 1), and returns it as audio_batch. Set batch_size to 1 (the default) and it's a pure passthrough - it returns your input untouched. There are no hidden inputs, no quality knobs, nothing to get wrong. batch_size takes 1–64; values above that cap get clamped.

Installing it

It ships in the same traugdor/ComfyUI-Riffusion pack as the main generator node, so there's no separate install. ComfyUI Manager (search "ComfyUI-Riffusion") or:

cd ComfyUI/custom_nodes
git clone https://github.com/traugdor/ComfyUI-Riffusion

then restart ComfyUI. The pack's __init__.py auto-installs its Python requirements (numpy, scipy, torch, torchaudio, pedalboard) on first startup, so give it a moment after the restart. It's also on the Comfy Registry at registry.comfy.org/publishers/traugdor/nodes/riffusion. None of the Riffusion-specific FFmpeg business applies to this node - it never touches files, so no MP3 conversion, no FFmpeg dependency. It's pure tensor shuffling.

Gotchas

Honestly, there aren't many. The one thing that trips people up is expecting the batch to contain distinct audio - it doesn't, by design. And because batch_size 1 is a silent passthrough, it's easy to leave the node in a workflow and forget it's there. It's a tiny utility from a small, 2025-era single-author pack, so it'll do this one thing until it doesn't need to - and then you can delete it from the graph without anything noticing. If you find yourself reaching for a high batch_size with real hopes of variety, that's a signal to step back and feed the graph a real batch of spectrograms instead.

Categoryaudio

Inputs (2)

NameTypeDefaultDescription
audioAUDIO
batch_sizeINT11–64

Outputs (1)

NameTypeDescription
audio_batchAUDIO