Nodes/ComfyUI-Distributed/Audio Segment Divider
ComfyUI Node

Audio Segment Divider

Chop one waveform into sequential slices for parallel work

By robertvoy·Created about a year ago·Updated 29 days ago· 582
Audio Segment Divider
  • audio
  • audio_1
divide_by2

Audio Segment Divider is the audio counterpart to Image Batch Divider, and it does exactly what the name says: it takes one audio waveform and splits it into sequential time segments - up to ten of them - each coming out on its own socket. If you're building a distributed audio workflow and need to hand different chunks of a track to different workers, or just to route sections of a clip down separate paths, this is the splitter.

Its class name is AudioBatchDivider but it displays as Audio Segment Divider, which is the more accurate label. It's slicing along time, not un-stacking a batch of separate clips - the segments are consecutive stretches of the same waveform.

How it works

The whole ComfyUI-Distributed pack is built on running work in parallel across GPUs. For images and video, the divider nodes exist to un-stack outputs that came back merged. For audio, the same shape applies: you've got a waveform and you want it broken into pieces that can be processed or saved independently. Audio Segment Divider cuts the incoming AUDIO into however many equal, back-to-back time segments you ask for, in order - segment one is the start of the clip, the next follows it, and so on to the end.

Because it slices sequentially rather than shuffling, reassembling the pieces in output order reconstructs the original timeline. That's the point: split, do per-segment work, and the ordering is preserved for you.

The inputs and outputs

  • audio (AUDIO) - the waveform to divide.
  • divide_by (INT, default 2, range 1–10) - how many sequential segments to cut it into. Ten is the ceiling, which doubles as a hint about the intended scale - a handful of pieces, not hundreds.

The first output is audio_1 (AUDIO), the opening segment; as you increase divide_by, the node exposes further numbered outputs (audio_2, audio_3, …) so each slice has its own socket. It's also an output node, so a segment branch can terminate on it directly. Wire each segment wherever it needs to go - separate save nodes, separate processing chains, or separate workers.

Installing it

Ships inside the ComfyUI-Distributed pack. In ComfyUI Manager, search ComfyUI-Distributed, install, and restart. Or from a terminal: cd ComfyUI/custom_nodes && git clone https://github.com/robertvoy/ComfyUI-Distributed.git, then restart ComfyUI. There's nothing to download beyond the pack - no model files, no unusual Python packages. The pack as a whole is aimed at multi-GPU and multi-machine setups, so if your audio workers live elsewhere, launch the master with --enable-cors-header.

Where people get burned

  • Expecting a batch split, getting a time split. This cuts one clip into consecutive segments; it does not separate a stack of distinct audio clips. If you fed it several independent tracks stacked together and expected them un-stacked, this isn't that tool.
  • Odd durations. It divides into equal segments, so a length that doesn't divide cleanly by your count can leave a slightly uneven final slice. Fine for most uses; worth knowing if sample-exact boundaries matter.
  • Mismatched divide_by. As with the image divider, the number of segments should match whatever downstream expects - set it deliberately rather than leaving the default 2 and wiring three save nodes.
  • Reaching for it without a reason. This is a niche node in a niche corner of the pack. Most people running ComfyUI-Distributed never touch audio at all; if your workflow is images or video, you want Image Batch Divider or nothing. Only pick this up if you genuinely have a waveform to carve into parallel pieces.
Categoryaudio

Inputs (2)

NameTypeDefaultDescription
audioAUDIO
divide_byINT21–10Number of sequential time segments to create

Outputs (1)

NameTypeDescription
audio_1AUDIO