Nodes/comfyui-sequential-batcher/📂 Batch Audio Folder Loader
ComfyUI Node

📂 Batch Audio Folder Loader

Load a whole folder of audio into a batch, in one shot

By Meisoftcoltd·Created 7 months ago·Updated 18 days ago· 3
📂 Batch Audio Folder Loader
    • audio_list
    • file_names
    • file_count
    • log
    folder_path

    The batch-loop pattern needs a front door for "many files." BatchAudioFolderLoader is that front door for audio: point it at a folder, and it loads every supported audio file into a list (AUDIO_LIST), keeps the parallel list of file names, and hands you the count. From there, the pack's AudioBatchSelector dispatches one file per loop cycle.

    If this sounds like the audio version of a batch image loader, that's exactly right. The difference is it standardizes everything as it loads - every file gets resampled to 44.1kHz stereo through the same extract_and_standardize_audio helper the video analyzers use, so downstream nodes never have to care that one file was 32kHz mono and another was 48kHz 5.1.

    How it works

    It scans the folder for .mp3, .wav, .ogg, .flac, and .m4a files, sorts them by name, and loads each one through torchaudio, resampling to 44.1kHz and forcing stereo (downmixing 5.1 to stereo, duplicating mono to stereo). Files that fail to load get logged and skipped rather than killing the batch. It then returns:

    • audio_list (AUDIO_LIST) - the loaded, standardized batch.
    • file_names (STRING_LIST) - matching names in the same order.
    • file_count (INT) - how many made it in.
    • log (STRING) - per-file status.

    If the folder path is invalid or empty, it returns a 0.1-second silence placeholder plus an "error" name instead of crashing. That's defensive to the point of being a little surprising - you'll see a file_count of 0 and might think you loaded something. Check file_count before trusting the batch.

    Inputs

    Just one: folder_path (STRING). The tooltip is the pack's own pointer - it says "connect to the output folder_path of Telegram WaitForMultipleFiles," which reveals this node's origin: it was built for a workflow where a Telegram bot waits for files to arrive and then hands the folder path to ComfyUI. You don't need Telegram for it to work, though. Any string path works, and it'll accept a wired connection or a typed path.

    Where it fits

    Standard chain: BatchAudioFolderLoaderAudioBatchSelector → per-cycle processing. The selector reads the same batch index the TTS batch calculator uses, so a folder of narration files and a folder of scripts stay in lockstep across the loop. It's the least glamorous node in the pack and also one of the most useful if you process folders of audio at all.

    Install

    ComfyUI Manager → search "comfyui-sequential-batcher", or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Meisoftcoltd/comfyui-sequential-batcher
    

    Restart ComfyUI. It needs torchaudio (installed with the pack) and FFmpeg on your PATH for the trickier container types. Pack-wide note: launch ComfyUI without --highvram so the loop's memory management can work.

    Category🔁 Sequential Batcher/Audio

    Inputs (1)

    NameTypeDefaultDescription
    folder_pathSTRINGConectar al output folder_path de Telegram WaitForMultipleFiles

    Outputs (4)

    NameTypeDescription
    audio_listAUDIO_LIST
    file_namesSTRING_LIST
    file_countINT
    logSTRING