Nodes/comfyui_uvr_mdx/UVR MDX Inst HQ5 Separator
ComfyUI Node

UVR MDX Inst HQ5 Separator

Pull vocals out of a song without leaving ComfyUI

By DEMOUSL·Created 5 months ago·Updated 5 months ago· 1
UVR MDX Inst HQ5 Separator
  • audio
  • instrumental_audio
  • vocals_audio
  • info
deviceauto
segment_seconds15.0
margin_seconds1.0
denoisetrue
compensation1.010
batch_index0

This node is the "rip the vocals out of a track" step, done inside ComfyUI instead of round-tripping through the Ultimate Vocal Remover desktop app. Feed it any AUDIO and you get two stems back: instrumental_audio and vocals_audio. It runs the same UVR-MDX-NET-Inst_HQ_5.onnx model that powers UVR, which matters more than it sounds - that's a proven, battle-tested separator, not some random model somebody wrapped.

The "HQ5" in the name is UVR's Inst HQ5 model: the instrument/backing-track variant of the high-quality MDX-Net family. It's a two-stem separator - vocal vs. everything else. If you were hoping for demucs-style bass/drums/other four-stems, that's a different tool; this one gives you the classic karaoke split. Which is exactly what you want before an RVC training run, a remix, or a clean voiceover source for a music-video workflow.

How it works

The heavy lifting happens in an ONNX Runtime session, not in torch - that's why the node's deps are just numpy plus an onnxruntime package. The pipeline is standard MDX-Net: STFT the waveform into a spectrogram, run the model on it, iSTFT the prediction back into audio. Crucially, the model predicts the instrumental, and vocals = original − instrumental. That subtraction is why the two outputs sum back to (approximately) your input.

A few things the code does so you don't have to think about them:

  • Resamples to 44.1 kHz for inference, then restores your original sample rate on the way out.
  • Mono in, stereo out - a mono track gets duplicated to a stereo pair before separation.
  • Long-audio chunking - the model works on fixed-size windows, so long files are split into segment_seconds chunks with margin_seconds of overlap, and the margins are trimmed when stitching back together so you don't hear clicks at the seams.
  • Session caching - it keeps the loaded ONNX session around (keyed by model path + provider), so a re-run doesn't reload the model from disk.

The inputs that matter

audio is a ComfyUI AUDIO - wire it straight out of a Load Audio / VHS_LoadAudio style node. device defaults to auto, which tries CUDA, then DirectML, then CPU. That default is almost always right; the manual cuda / directml options only fail if you've installed the wrong onnxruntime flavor. denoise (default on) is the UVR inference trick where it runs the spectrogram both positive and negative and averages the results - it reduces artifacts. Leave it on. segment_seconds (15) and margin_seconds (1) are the chunk knobs; for very long tracks you can raise segment, but defaults are fine. compensation (1.01) is a tiny output gain bump on the instrumental. batch_index picks which item from a batched AUDIO input to separate.

Outputs

instrumental_audio and vocals_audio are both AUDIO - the natural next hop is a Save Audio / video nodes save node, or straight into an RVC-style pipeline. The third output, info, is a plain string telling you which model ran, which ONNX provider, the sample rate, and your denoise/compensation settings - handy if you're A/B-ing settings and forget which run was which.

Installing it

ComfyUI Manager can find it by searching "comfyui_uvr_mdx" (or "UVR"). Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/DEMOUSL/comfyui_uvr_mdx

Then install deps in the same Python env ComfyUI uses:

pip install -r requirements.txt

The requirements are just numpy and onnxruntime. For GPU, swap in onnxruntime-gpu (NVIDIA CUDA) or onnxruntime-directml (Windows) - the README explicitly says to replace the default for acceleration. The good news: the ~59 MB UVR-MDX-NET-Inst_HQ_5.onnx model is bundled in the repo, so there's no separate download step. Just restart ComfyUI and it shows up under audio/uvr.

Common issues

  • "Bundled model not found" - the model lives in the node's models/ folder. If you cloned before it was there or trimmed the checkout, make sure UVR-MDX-NET-Inst_HQ_5.onnx is in comfyui_uvr_mdx/models/.
  • "This node requires onnxruntime" - you skipped the pip step, or installed it in the wrong Python. On the Windows portable build, that's the embedded Python in ComfyUI_windows_portable/python_embeded.
  • Provider errors on cuda / directml - usually a mismatched onnxruntime build for your hardware. Flip device back to auto or install the right package.

One honesty note the README makes too: the MIT license covers the code; the bundled model is UVR's and the repo asks you to verify redistribution terms before republishing it. For personal use you're fine.

When would I pick this over the UVR desktop app? When the whole job lives in the graph - I'm already in ComfyUI, the file's loaded, and I want the stems wired onward without exporting anything. For one-off karaoke, the desktop app is still more polished. For a workflow, this is the piece that belongs.

Categoryaudio/uvr

Inputs (7)

NameTypeDefaultDescription
audioAUDIO
deviceCOMBOauto4 options: auto, cuda, directml, cpu
segment_secondsFLOAT15.00–120
margin_secondsFLOAT1.00–10
denoiseBOOLEANtrue
compensationFLOAT1.0100–4
batch_indexINT00–4096

Outputs (3)

NameTypeDescription
instrumental_audioAUDIO
vocals_audioAUDIO
infoSTRING