Nodes/Audio Separation (Demix)/Demucs Audio Separator
ComfyUI Node

Demucs Audio Separator

Four stems in one pass with Demucs

By set-soft·Created about a year ago·Updated 7 months ago· 30
Demucs Audio Separator
  • input_sound
  • vocals
  • drums
  • bass
  • other
  • guitar
  • piano
model
shifts0
overlap0.25
custom_segmentfalse
segment44
target_devicecpu

MDX nodes get you a stem fast, but if you've heard the difference you know: for real quality you reach for Demucs. Demucs Audio Separator (AudioSeparateDemucs) is the heavyweight half of the Audio Separation (Demix) pack - one node, one pass, and out come vocals, drums, bass and everything else as separate AUDIO signals. That's four stems you'd otherwise need four MDX nodes and four runs to get.

This is the node the audio-reactive music-video crowd leans on - the kind of pipeline that separates stems and feeds the levels into AnimateDiff, ControlNet or IPAdapter keyframe work. If you're doing that, you want the cleanest stems you can get, which is Demucs' whole job.

How it works

Demucs is Meta's music source-separation architecture; the pack ships its models as safetensors. Two things matter mechanically:

Most models are a "bag of models." A bag runs several different Demucs models on your audio and averages their outputs - noticeably better separation at the cost of doing the work N times. The default, Hybrid Transformer fine-tuned (htdemucs_ft), is the one to use unless you have a reason not to.

The chunking is tunable. Long tracks get split and stitched, and three inputs control that stitching:

  • shifts - random time shifts for "equivariant stabilization." Each shift is an extra pass on slightly shifted audio, averaged in for cleaner results. Default 0 (off); it genuinely helps but roughly doubles cost per shift. 1 is the sweet spot for a one-shot job.
  • overlap - how much consecutive chunks overlap (0–0.99, default 0.25). More overlap reduces stitching artifacts, costs time. You rarely need to touch it.
  • segment / custom_segment - the chunk length in seconds (10–120, default 44). With custom_segment off, the node uses the model file's recommended length, which is the right call for Hybrid Transformer models. Flip it on only for the older HDemucs/Demucs models if you're fighting memory limits.

Same normalization as the rest of the pack: resampled to 44.1 kHz, mono faked to stereo, batches handled sequentially. Like the MDX nodes it reuses the demixer object between runs, so changing just the segment length doesn't reload the model.

The outputs

All six sockets exist, but not every model fills them:

  • vocals, drums, bass, other - the standard 4-stem split.
  • guitar, piano - populated only by the Hybrid Transformer 6 sources model, which the README is refreshingly honest about calling "quite experimental." Unused outputs come back as None.

One caveat: the UVR Demucs model only supports vocals and other, so drums/bass/other can come back empty with it. The 4-stem and 6-stem models are where the node shines.

Installing it

Same pack as the rest - ComfyUI Manager (search Audio Separation), or:

cd ComfyUI/custom_nodes/
git clone https://github.com/set-soft/AudioSeparation
pip install seconohe
# restart ComfyUI

Dependencies are light: torchaudio, numpy, safetensors, tqdm and seconohe - nothing exotic. The real cost is the models. Demucs files run from 84 MB up to ~870 MB, auto-downloading to ComfyUI/models/audio/Demucs on first use. Expect a real wait on first run, and the bag-of-models default makes the first completion slow too.

Common issues

  • First run looks frozen. Big model download, then a long first pass. It's not hung - Demucs-based nodes in ComfyUI are notorious for stalling-looking first runs while they pull multi-hundred-MB weights. Give it a minute before you kill the server.
  • Guitar/piano outputs empty - you picked a 4-stem model. Pick Hybrid Transformer 6 sources or ignore those sockets.
  • VRAM pressure on long segments - lower segment or turn custom_segment on to cap it. And if MDX artifacts were never the problem and you're only ever separating one stem, the smaller MDX nodes will run circles around this one on speed.

Use this when quality is the point. It's slower, heavier, and worth every second on anything you actually care about.

Categoryaudio/separation

Inputs (7)

NameTypeDefaultDescription
input_soundAUDIO
modelCOMBO13 options: ⬇️ Hybrid Transformer fine-tuned, ⬇️ Hybrid MDX 1st 2021A, ⬇️ Hybrid MDX 2nd 2021B, ⬇️ Hybrid MDX A Rep. HO, ⬇️ Hybrid MDX A Rep. TO, ⬇️ Hybrid MDX A Reprod., +7
shiftsINT00–16Number of random shifts for equivariant stabilization. Higher values improve quality but are slower. 0 disables it.
overlapFLOAT0.250–0.99Amount of overlap between audio chunks. Higher values can reduce stitching artifacts but are slower.
custom_segmentBOOLEANfalseEnable to override the model's default segment length. Disabling uses the recommended length from the model file. Useful for HDemucs and Demucs models, not much for HTDemucs.
segmentINT4410–120Length of audio chunks to process at a time (in seconds). Higher values need more VRAM but can improve quality.
target_deviceCOMBOcpuThe device (CPU or CUDA) to which the projection layer will be assigned for computation.

Outputs (6)

NameTypeDescription
vocalsAUDIO
drumsAUDIO
bassAUDIO
otherAUDIO
guitarAUDIO
pianoAUDIO