Nodes/comfyui-timesaver/TS Music Stems
ComfyUI Node

TS Music Stems

Karaoke, remixes, and clean vocals — all inside the graph

By AlexYez·Created 2 years ago·Updated a day ago· 12
TS Music Stems
  • audio
  • vocal
  • bass
  • drums
  • others
  • instrumental
  • guitar
  • piano
model_namebs_roformer_sw
deviceauto
shifts2
overlap0.50
jobs0
precisionfp16

You've got a song, you want the vocals out of it (or the bass, or a clean instrumental for the background of a video), and you don't want to leave ComfyUI to do it. TS Music Stems splits audio into stems on the canvas, and it does the split properly - which in this space is more of a differentiator than it sounds.

The engine is the whole story

What you get depends on model_name, and the default is the right default:

  • BS-RoFormer SW (default) - six stems: vocal, bass, drums, guitar, piano, and others for the leftovers. Best overall.
  • Mel-Band RoFormer - vocals and instrumental only, but better at that one split than any six-stem model, because it spends its whole capacity on the single boundary that matters. Reach for this when two stems are all you need.
  • Demucs (htdemucs, htdemucs_ft, hdemucs_mmi) - the older engine, kept so workflows saved before the RoFormer engines still produce what they always produced.

Two details make this node feel thought-through. First, the stems actually add back up to the mix: mask-based separation doesn't do that on its own (the error shows up instantly in a null test), so one stem is computed as the mix minus everything else - the pack measured vocal + instrumental nulling against the source at 161 dB. Second, outputs a model can't produce are blocked, not silenced: ask Mel-Band for drums and that branch of the graph simply doesn't run, instead of handing you a silent stem that looks like a broken model and costs you an afternoon.

The inputs that matter

  • audio - feed it from TS Audio Loader (or any node emitting ComfyUI AUDIO).
  • model_name - the engine picker above.
  • precision - fp16 by default for the RoFormer engines. Roughly twice as fast on half the VRAM, and the measured error against fp32 stays below the recording's noise floor. bfloat16 is deliberately not offered (the models build their mask via view_as_complex, which won't accept it).
  • shifts and jobs - Demucs-only (TTA passes and CPU workers). Ignored by the RoFormer engines, so leave them alone unless you've gone legacy.

The outputs are what the name says: vocal, bass, drums, others, instrumental (full mix minus vocals), and - with BS-RoFormer SW only - guitar and piano. Feed them into TS Audio Preview to audition, or TS Video Saver to mux back into a clip.

Install

Here's the nice bit: the default RoFormer engines need no extra dependencies - their pure-Python deps (einops, rotary-embedding-torch) are part of the pack's core install. Weights download once into models/roformer/ on first use, and if you already have a Mel-Band checkpoint from another pack, it's found where it lies instead of re-downloaded. The demucs extra (pip install -e .[audio-stems]) only exists to resurrect the legacy engine - and the pack's own notes warn that geomloss/pykeops frequently fail to build on Windows portable, which is exactly why they stay opt-in.

cd ComfyUI/custom_nodes
git clone https://github.com/AlexYez/comfyui-timesaver
cd comfyui-timesaver
python -m pip install -r requirements.txt

Common issues

  • The guitar/piano sockets are "empty." They're blocked on anything that isn't BS-RoFormer SW by design - switch the engine.
  • RoFormer is slow on a big track. It chunks the audio; overlap controls the chunk stitching (capped at 0.5 for these engines, which is all their windowing uses). This is a heavy model on a long song - that's normal, not a hang.
  • "Module not found" for demucs. You're on a legacy workflow; install the audio-stems extra, or just switch to bs_roformer_sw and get better results.

For karaoke instrumentals, remix stems, or feeding cleaner vocals into a Whisper or TTS chain, this is the node to reach for - and the six-stem default means you rarely need to touch anything except the input.

CategoryTS/Audio

Inputs (7)

NameTypeDefaultDescription
audioAUDIOAudio track to split into stems.
model_nameCOMBObs_roformer_swbs_roformer_sw: six stems, best overall. melband_roformer: vocals + instrumental only, and better at that one split than any six-stem model. htdemucs*: the older engine, kept so saved workflows keep producing what they always produced.
deviceCOMBOautoCompute device. auto picks GPU when available, otherwise CPU.
shiftsINT20–10Demucs only: TTA passes. 2 = high quality, 4 = very slow. Ignored by the RoFormer engines.
overlapFLOAT0.500–0.9Chunk overlap for smoother stitching. The RoFormer engines cap this at 0.5, which is all their windowing can use.
jobsINT00–16Demucs only: CPU workers for pre-processing. 0 = auto. Ignored by the RoFormer engines.
precisionoptCOMBOfp16RoFormer engines only. fp16 runs about twice as fast on half the VRAM; measured against fp32 on real music its error stays at -61 dBFS or below, under the noise floor of the recording. bfloat16 is not offered: these models build their mask through view_as_complex, which does not accept it.

Outputs (7)

NameTypeDescription
vocalAUDIOIsolated vocals stem.
bassAUDIOIsolated bass stem.
drumsAUDIOIsolated drums stem.
othersAUDIOEverything that is not vocals, bass or drums. With BS-RoFormer SW that includes guitar and piano, which are also available separately below.
instrumentalAUDIOThe full mix minus vocals.
guitarAUDIOBS-RoFormer SW only. Blocked on the other engines.
pianoAUDIOBS-RoFormer SW only. Blocked on the other engines.