π₯ Batch Load Audio
Batch a folder of audio through ComfyUI without a script
- AUDIO
- SLOT
- TOTAL
- RELATIVE_PATH
Audio is the quiet third media type in ComfyUI - everyone knows image workflows, video is getting there, but audio nodes are the ones you have to go looking for. And when you do have a batch of them to process - a denoise job, a restoration pass, whatever your audio chain does - the manual alternative is brutal. BatchLoadAudio is the source node of this pack's audio pair: it scans a folder tree, hands out one audio file per run as the standard ComfyUI AUDIO dict, and lets the matching BatchSaveAudio keep the loop going until the folder's done.
It's a drop-in replacement for core LoadAudio, and it behaves exactly like its image sibling: no in-graph loop, the Save node re-queues the same prompt until every file is handled. The Load node rescans the folder on every execution and derives which file is next from which destinations already exist in the output tree. That one mechanism buys you crash recovery, restart resilience, and re-runs with zero reset step - drop new files in between runs and they just get picked up.
Inputs
Three widgets, same shape as every Load node in this pack:
folder_path- absolute path to the root of the audio tree.recursive- walk subfolders (default on).container_format-wav/mp3/flac/ogg/m4a/opus, orall_audio. Defaultwav.
Same gotcha as the rest of the pack: files with extensions outside the selected format are silently ignored. A mixed folder means separate runs per format, or just pick all_audio.
Outputs
AUDIO - the current file as the standard ComfyUI audio dict: a waveform tensor [1, C, N] in float32, plus sample_rate, normalized to [-1, 1], one row per channel. The detail that actually matters: mono and stereo sources survive the round-trip. Packed or interleaved decodes like WAV and FLAC get reshaped to [1, C, N] rather than flattened into a doubled mono channel - the kind of silent corruption that shows up as audio that's technically there but wrong, and that you'd be chasing for an hour. This node just doesn't do it.
Then the three bookkeeping outputs, same as every node in the pack: SLOT (0-based index), TOTAL (matching file count), and RELATIVE_PATH (path relative to folder_path, posix separators). Wire all three into BatchSaveAudio - that's how the save half knows the name, the count, and the subfolder to mirror.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/lordekeen/comfyui-simple-batch
Restart ComfyUI. Or search ComfyUI Simple Batch in Manager and click Install. No pip step - the pack uses ComfyUI's bundled PyAV for anything that needs encoding, and the loaders are pure Python on top of core ComfyUI. Needs a recent ComfyUI build (it's written against the newer V3 node API), Python 3.10+, and nothing else. Set output_root on the Save node to a folder outside your input tree and you're running.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| folder_path | STRING | Root of the input folder tree (absolute path). | |
| recursive | BOOLEAN | true | Walk subfolders recursively. |
| container_format | COMBO | wav | Only files with this extension (or all_audio) are processed. |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| AUDIO | AUDIO | The current audio file as standard ComfyUI AUDIO dict. |
| SLOT | INT | 0-based index of the current file for this run. |
| TOTAL | INT | Total matching file count for this run. |
| RELATIVE_PATH | STRING | Current file's path relative to folder_path (posix separators). |