ComfyUI Node

Load Demucs

Load Facebook's Demucs to split music into stems

By kale4eat·Created 2 years ago·Updated about a year ago· 23
Load Demucs
    • demucs
    model
    device
    shifts1
    overlap0.25
    splittrue
    segment-1
    jobs0
    progressfalse

    Demucs is Facebook Research's music source separation model - the thing that splits a mixed track into drums, bass, vocals, and everything else ("other"). In a speech-dataset context, its real job is cleanup: strip music and instrumentation out of a clip so you're left with clean vocals before you run transcription or VAD on it. This node loads the model; SDT_DemucsApply is where you actually run it on a clip.

    How it works

    Under the hood this is the real facebookresearch/demucs package, not a reimplementation - a well-known, actively used separator that plenty of other ComfyUI audio nodes wrap too. Loading configures which architecture and how it processes long audio (chunking, overlap, averaging), and the model comes back ready for SDT_DemucsApply to run inference with.

    The inputs and outputs that matter

    • model - htdemucs or htdemucs_ft. htdemucs (Hybrid Transformer Demucs) is the current general-purpose separator and the one to start with. htdemucs_ft is the fine-tuned variant - Demucs' own documentation is upfront that it runs each of the four stems through a separately fine-tuned pass, so separation takes roughly four times longer in exchange for somewhat cleaner stems. Reach for it only once you've confirmed htdemucs isn't good enough for your source material.
    • device - auto / cpu / cuda. Demucs is a real transformer model - GPU matters a lot more here than it does for something like Silero VAD.
    • shifts (default 1) - Demucs' random-shift averaging trick: run inference multiple times with small random time shifts and average the results, which measurably improves separation quality at a roughly linear cost in runtime. Bump it to 2–5 if quality matters more than speed for a given batch.
    • overlap (default 0.25) and segment (default -1, meaning the model's own default chunk length) - control how long audio gets split into overlapping windows for processing; leave these alone unless you're hitting memory limits on long clips, in which case shrinking segment helps.
    • split (default true) - whether to chunk long audio at all; turning it off processes the whole clip in one pass, which needs more memory but avoids any windowing artifacts.
    • jobs (default 0) - CPU-side parallelism for chunk processing; irrelevant if you're running on GPU.
    • progress (default false) - a console progress bar during separation, not visible in the ComfyUI UI itself.
    • demucs (output) - wire straight into SDT_DemucsApply.

    How to install it

    ComfyUI Manager: search ComfyUI-speech-dataset-toolkit, install, restart. Manual:

    cd ComfyUI/custom_nodes
    git clone https://github.com/kale4eat/ComfyUI-speech-dataset-toolkit
    cd ComfyUI-speech-dataset-toolkit
    pip install torchaudio --index-url https://download.pytorch.org/whl/cu121
    pip install -r requirements.txt
    

    Demucs pulls its own model weights from its usual source on first load - expect a real download the first time you use this node, same story as any pretrained model.

    Common issues & troubleshooting

    Separation is slow. Check shifts first - it's the most common accidental slowdown, since anything above 1 multiplies runtime directly. htdemucs_ft is the other big one; only use it if htdemucs genuinely isn't clean enough.

    Out of memory on long files. Make sure split is true (the default) and try lowering segment from -1 to a fixed shorter chunk length - that's the actual memory lever, more so than overlap.

    Output stems have separation artifacts or bleed between vocals and other. That's a known Demucs limitation on difficult mixes (heavily processed vocals, dense mastering) rather than a misconfiguration - htdemucs_ft or more shifts can help marginally, but expect some bleed on hard source material regardless of settings.

    Categoryspeech-dataset-toolkit/ai/demcus

    Inputs (8)

    NameTypeDefaultDescription
    modelCOMBO2 options: htdemucs, htdemucs_ft
    deviceCOMBO3 options: auto, cpu, cuda
    shiftsINT11–4294967296
    overlapFLOAT0.25
    splitBOOLEANtrue
    segmentINT-1-1–4294967296
    jobsINT00–1024
    progressBOOLEANfalse

    Outputs (1)

    NameTypeDescription
    demucsDEMUCS