Nodes/comfyui-huyl2-nodes/Split MP3 V2 (3min segments) ✂️
ComfyUI Node

Split MP3 V2 (3min segments) ✂️

Configurable chunk length, a real list output, and it leaves short files alone

By huyl3-cpu·Created 9 months ago·Updated 4 months ago· 1
Split MP3 V2 (3min segments) ✂️
    • file_paths
    • count
    mp3_path
    output_folder/content/ComfyUI/output/mp3_split
    max_minutes3.0

    This is the second version of huyl3-cpu's MP3 splitter, and it fixes essentially everything the plain SplitMP3 was missing. The node's own description spells out the logic plainly: if your file's duration is already under the max_minutes limit, it's returned untouched - no pointless splitting of a file that's already short enough. If it's longer, it gets cut into chunks of max_minutes each, with the final chunk being whatever's left over.

    The default chunk length also dropped from SplitMP3's hardcoded 7 minutes down to a much more sensible 3 - a size that fits more per-segment generation loops (TTS chunks, per-clip video generation) without needing to touch the default at all.

    The inputs and outputs that matter

    • mp3_path - STRING, the source file. Required.
    • output_folder - STRING, default /content/ComfyUI/output/mp3_split.
    • max_minutes - optional FLOAT, default 3, range 0.560 in half-minute steps. The one real configuration knob, and the whole reason to reach for this over V1.

    Outputs, and this is the real upgrade: file_paths is a genuine LIST of strings, one per output file (or the single original path, if nothing needed splitting) - not a folder you have to glob yourself. Because it's list-typed, any downstream node consuming it runs once per chunk automatically, which is exactly the batching behavior you usually want after a split. count (INT) gives you the total number of files, so you can sanity-check a run without opening the output folder.

    Installing it

    ComfyUI Manager: search comfyui-huyl2-nodes, install, restart. By hand:

    cd ComfyUI/custom_nodes
    git clone https://github.com/huyl3-cpu/comfyui-sortlist
    

    restart ComfyUI. Neither this node nor SplitMP3 is mentioned in the pack's README, which covers a single unrelated node and assumes a Colab environment throughout. Given the audio-cutting job, expect a dependency on ffmpeg or a Python audio library under the hood - if you're not on the author's preconfigured Colab image, make sure ffmpeg is actually on your PATH before you rely on this.

    Common issues & troubleshooting

    Worth testing deliberately: what happens to that final, shorter "remainder" chunk if your total duration doesn't divide evenly by max_minutes. A 12-second leftover at the tail end of an otherwise 3-minute-chunk batch can trip up anything downstream that assumes roughly uniform segment length (a fixed-duration video generator being fed one clip per chunk, say) - check your count and the actual last file before assuming every chunk is safe to treat identically.

    If a run produces exactly one file no matter the input, that's the "already under max_minutes, return unchanged" branch doing its job - not a bug. Lower max_minutes if you expected more, smaller chunks out of a file that's actually shorter than you thought.

    And since file_paths is a real list, remember that anything wired to it will fan out and run once per chunk - if you only want to operate on a single file (say, just the first chunk), you'll need to pick one out of the list explicitly rather than assuming a downstream node takes the whole batch at once.

    Categoryutils

    Inputs (3)

    NameTypeDefaultDescription
    mp3_pathSTRINGĐường dẫn tuyệt đối đến file .mp3
    output_folderSTRING/content/ComfyUI/output/mp3_splitThư mục lưu các file sau khi cắt
    max_minutesoptFLOAT3.00.5–60─Éß╗Ö d├ái tß╗æi ─æa mß╗ùi ─æoß║ín (ph├║t). Mß║╖c ─æß╗ïnh 3 ph├║t.

    Outputs (2)

    NameTypeDescription
    file_pathsSTRING
    countINT