Select Audio From Batch
The tiny node that keeps batch foley from drowning you in audio
- audio_batch
- AUDIO
Set the sampler's batch_size to 4 and you get four different takes of the same clip's sound. That's great for auditioning variations - until you realize the obvious problem: most audio nodes downstream want one audio, not four stacked together. This is the node that unpicks that. It takes the sampler's audio_batch output, pulls out a single take by index, and hands you a clean one-clip AUDIO object you can preview or save.
It's a two-input, one-output utility with zero mystery: audio_batch in (an AUDIO object carrying a batch of waveforms) and index (0-based, default 0, up to 63). Out comes AUDIO. If you pick an index past the end of the batch, it doesn't error - it clamps to the last item and logs a warning, which is friendlier than it needed to be. That's the whole thing, and that's fine. Not every node needs to be complicated.
The typical wiring, from the pack's own example workflow: HunyuanFoleySampler → SelectAudioFromBatch → PreviewAudio, with a second PreviewAudio on the sampler's audio_first output so you can compare the single take against the raw batch. If you're feeling fancy, you can run several of these off the same batch at different indices and stack them into a "takes 2 and 4, please" pipeline - handy if you want to cherry-pick takes without rerunning the sampler, since the sampler's batch output is free to fan out.
One subtlety worth knowing: this node doesn't care where the batch came from. It's categorized under audio/utils, and it operates on any standard ComfyUI AUDIO object that has multiple waveforms - not just this pack's sampler. If some other audio node hands you a batch and you need one clip out of it, this works there too. It's a genuinely reusable little piece.
Nothing to install beyond the pack itself - it ships with it (ComfyUI Manager, search ComfyUI-HunyuanVideo-Foley, or git clone https://github.com/phazei/ComfyUI-HunyuanVideo-Foley into custom_nodes, then restart). No models, no dependencies of its own, no failure modes worth listing. It's the unglamorous plumbing that makes batch generation usable, and after a few runs where the first take was a dud and take 3 was the keeper, you'll be glad it exists.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| audio_batch | AUDIO | An audio object containing a batch of waveforms. | |
| index | INT | 00–63 | The 0-based index of the audio to select from the batch. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| AUDIO | AUDIO | — |