Load Demucs
Load Facebook's Demucs to split music into stems
- demucs
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-htdemucsorhtdemucs_ft.htdemucs(Hybrid Transformer Demucs) is the current general-purpose separator and the one to start with.htdemucs_ftis 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 confirmedhtdemucsisn'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(default1) - 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(default0.25) andsegment(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 shrinkingsegmenthelps.split(defaulttrue) - 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(default0) - CPU-side parallelism for chunk processing; irrelevant if you're running on GPU.progress(defaultfalse) - a console progress bar during separation, not visible in the ComfyUI UI itself.demucs(output) - wire straight intoSDT_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.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| model | COMBO | 2 options: htdemucs, htdemucs_ft | |
| device | COMBO | 3 options: auto, cpu, cuda | |
| shifts | INT | 11–4294967296 | — |
| overlap | FLOAT | 0.25 | — |
| split | BOOLEAN | true | — |
| segment | INT | -1-1–4294967296 | — |
| jobs | INT | 00–1024 | — |
| progress | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| demucs | DEMUCS | — |