Nodes/ComfyUI-Demucs-AudioSeparator/🎵 Demucs Audio Separator ⚡
ComfyUI Node

🎵 Demucs Audio Separator ⚡

The vocals aren't a separate file — this node splits any track into stems inside ComfyUI

By Meisoftcoltd·Created 7 months ago·Updated 2 months ago· 2
🎵 Demucs Audio Separator ⚡
  • audio
  • vocals
  • drums
  • bass
  • other
  • guitar
  • piano
  • instrumental
  • metadata
◄model▾►
◄device▾►
â—„precisionfloat32â–º
â—„shifts1â–º
â—„overlap0.25â–º
â—„splittrueâ–º
â—„normalizetrueâ–º
â—„gain_multiplier1.00â–º
â—„vocalstrueâ–º
â—„drumstrueâ–º
â—„basstrueâ–º
â—„othertrueâ–º
â—„guitarfalseâ–º
â—„pianofalseâ–º
â—„instrumentaltrueâ–º

Most of what you generate in ComfyUI is image or video, but the audio-reactive niche quietly runs on this kind of node. Yvann-style workflows separate a track into stems, then use the per-stem loudness to drive keyframe transitions, ControlNet strength, and motion - the whole "music literally drives the visuals" trick. This node is the front end of that: it wraps Meta's Demucs v4 (HTDemucs) and hands you the clean vocal, drum, bass, and "other" tracks, one output port each.

It's also just the fastest way to get a usable acapella or karaoke instrumental out of a song on your own machine. No cloud, no API key, no upload - feed it an AUDIO clip and the separation happens locally.

How it works

This is the real Demucs, not a reimplementation. The node calls demucs.pretrained.get_model and runs demucs.apply.apply_model on your audio. On first use it downloads the weights into ComfyUI/models/demucs via torch.hub, so it needs internet exactly once and each model lands as a few hundred megabytes on disk. Before inference it resamples whatever you fed it to Demucs' 44.1 kHz, and converts mono to stereo (Demucs strictly wants two channels). Then the hybrid-transformer model does its thing: shifts re-runs prediction with random input shifts and averages the results (better quality, proportionally slower), while overlap and split manage windowing for long files.

Two quirks from the source worth knowing. First, precision lists float32 and float16, but inference is hard-forced back to float32 to dodge cuFFT errors - so don't expect float16 to shrink your VRAM bill. The README's "bfloat16 for Ampere" advice doesn't even match the schema anymore; the code quietly upgrades bfloat16 to float32. Second, the instrumental output isn't a model output at all. It's computed as input minus vocals, and it uses the real vocals stem even if you've unticked the vocals output.

The inputs that matter

Only a handful are worth touching as a beginner:

  • model - the big one. htdemucs is the default; htdemucs_ft is the fine-tuned version and the best all-round 4-stem pick. Want guitar and piano too? Switch to htdemucs_6s (six stems). The mdx/mdx_extra family comes from the Music Demixing Challenge and is strong on drums and bass if that's your thing.
  • split (default on) - chunks long audio to avoid OOM. Leave it on unless you're processing short clips on a big card.
  • shifts (1–10, default 1) - quality dial. Leave it at 1 unless you're chasing quality; every step up re-runs the whole model.
  • device - cuda if you've got it; the node falls back to cpu for you otherwise.
  • normalize / gain_multiplier - the stems come out quieter than the mix, and these fix loudness.

The remaining vocals/drums/bass/other/guitar/piano/instrumental toggles just decide which outputs are real audio and which come back as silent zero tracks - the ports are always there, they're just quiet when unticked or when the model has no such stem.

Outputs and where they go

Seven AUDIO outputs (vocals, drums, bass, other, guitar, piano, instrumental) plus a JSON metadata blob telling you model, device, sample rate, and available sources. Wire any stem into a SaveAudio node or the ComfyUI preview to hear it.

Install

ComfyUI Manager is the easy route: search ComfyUI-Demucs-AudioSeparator, hit Install, restart. Or manually:

cd ComfyUI/custom_nodes
git clone https://github.com/Meisoftcoltd/ComfyUI-Demucs-AudioSeparator
pip install -r requirements.txt

The dependencies are the heavy part - demucs, torch, torchaudio, numpy, librosa, and soundfile. Here's a real gotcha nobody will warn you about: the shipped requirements.txt has a typo on its last line (soundfile===, an empty version), and pip will fail a fresh install with "No matching distribution found for soundfile===". If that happens, pip install soundfile librosa sorts it - they're the only bits that actually matter.

Troubleshooting

  • First run looks hung - it's downloading the model into ComfyUI/models/demucs. Watch the console, not the node.
  • Out of memory - split on, drop to htdemucs (the smallest real option), close other apps. The README calls split essential below 8 GB VRAM.
  • Guitar/piano outputs silent - you're on a 4-stem model; that's expected.
  • CUDA warnings - check your torch build actually has CUDA support.

The pack is a solo effort (the README is Spanish, signed "Bolt Edition" - your cue it's small and a little rough around the edges), but the core it wraps is the same Demucs people run outside ComfyUI, so results track the official tool.

Category🎵 Demucs-AudioSeparator ⚡

Inputs (16)

NameTypeDefaultDescription
audioAUDIO—
modelCOMBO10 options: htdemucs, htdemucs_ft, htdemucs_6s, hdemucs_mmi, mdx, mdx_extra, +4
deviceCOMBO2 options: cuda, cpu
precisionCOMBOfloat322 options: float32, float16
shiftsINT11–10—
overlapFLOAT0.250.1–0.9—
splitBOOLEANtrue—
normalizeBOOLEANtrue—
gain_multiplierFLOAT1.000–10—
vocalsBOOLEANtrue—
drumsBOOLEANtrue—
bassBOOLEANtrue—
otherBOOLEANtrue—
guitarBOOLEANfalse—
pianoBOOLEANfalse—
instrumentalBOOLEANtrue—

Outputs (8)

NameTypeDescription
vocalsAUDIO—
drumsAUDIO—
bassAUDIO—
otherAUDIO—
guitarAUDIO—
pianoAUDIO—
instrumentalAUDIO—
metadataJSON—