Nodes/ComfyUI_Demucs/Demucs_Sampler
ComfyUI Node

Demucs_Sampler

Pull the vocals out of any song inside ComfyUI

By smthemex·Created 2 years ago·Updated 9 months ago· 12
Demucs_Sampler
  • model
  • audio
  • mixed
  • bass
  • drums
  • other
  • vocals
ext
bits_per_sample
as_float
clip_mode
mp3_bitrate320
audio_savetrue
preset

Demucs_Sampler is the node that does the actual work in ComfyUI_Demucs. Feed it audio plus a model from Demucs_Loader, and it hands you back five AUDIO streams: separated bass, drums, other, and vocals, plus a "mixed" output. That's the whole music source separation pipeline - the same thing standalone tools like UVR do - running in your graph with no API and no account.

The name is borrowed from Demucs' own Separator API, by the way. It's not a diffusion sampler, no matter what your workflow instincts say.

What comes out

Five AUDIO outputs, all at 44.1 kHz:

  • vocals - the one everyone actually wants. Wire this into SaveAudio and you've got a karaoke track.
  • bass, drums, other - the instrument stems.
  • mixed - here's the trap: "mixed" is not your original song. The node sums bass + drums + other, which the README states plainly: it's the instrumental backing track with the vocals removed. If you want the original full mix, use the input audio.

A real quirk worth knowing: with the default htdemucs model, Demucs returns stems in the order drums, bass, other, vocals, and this node maps its labeled outputs onto that order without checking. Result - the bass and drums outputs come back swapped. The mixed, other, and vocals outputs are correct; just don't trust the two labels if you're isolating a specific instrument. That one's from reading the source, not the README, and it's a good reminder that the READMEs of these one-person packs rot.

The inputs that matter

The two essential ones are model (from Demucs_Loader) and audio (from LoadAudio, or any node that emits AUDIO). The rest are output-format controls that only affect the files written to disk, not the in-graph streams:

  • ext - mp3, flac, or wav for the saved files. mp3 needs lameenc, which the pack's requirements install.
  • bits_per_sample (16/24), as_float (float32/float16), mp3_bitrate (default 320) - bit depth, float format, and mp3 quality. Only matter with audio_save on.
  • clip_mode (default rescale) - how the node stops clipping when writing to a lossy or low-bit-depth format. rescale is the safe default; none if you want raw output and don't mind potential distortion.
  • audio_save - default on, and worth turning off if you only need the AUDIO outputs. When it's on, every run writes a new audio_<random> folder under ComfyUI/output, which piles up fast.
  • preset - here's a dead control: the node declares a preset dropdown but never actually uses it in its code. Ignore it. It does nothing in the current version.

Installing ComfyUI_Demucs

ComfyUI Manager can install it if you search "ComfyUI_Demucs", or clone it directly:

cd ComfyUI/custom_nodes
git clone https://github.com/smthemex/ComfyUI_Demucs.git

Then run pip install -r requirements_minimal.txt from the README and restart ComfyUI. The only real dependency surprise is openunmix, which pulls in a big stack of audio libraries - expect the install to be chunky for such a small pack. No model download is needed from you; the weights fetch automatically on first run.

Troubleshooting

The first-run failure mode is the model download - Demucs' weights come from Meta's servers on demand, so a network hiccup on the very first split looks like the node broke. Rerun once you're online.

The other gotchas are the ones above: mixed is the instrumental, not the original, and bass/drums come back swapped with the default model. If your track's input sample rate isn't 44.1 kHz, the outputs get resampled to 44.1 regardless - fine for saving, worth knowing if you're comparing against the source. None of this stops the common case from working: load a song, grab the vocals, save them, done.

CategoryDemucs

Inputs (9)

NameTypeDefaultDescription
modelDemucs_MODEL
audioAUDIO
extCOMBO3 options: mp3, flac, wav
bits_per_sampleCOMBO2 options: 24, 16
as_floatCOMBO2 options: float32, float16
clip_modeCOMBO4 options: rescale, clamp, tanh, none
mp3_bitrateINT3201–4096
audio_saveBOOLEANtrue
presetCOMBO6 options: 2, 3, 4, 5, 6, 7

Outputs (5)

NameTypeDescription
mixedAUDIO
bassAUDIO
drumsAUDIO
otherAUDIO
vocalsAUDIO