凤希AI - 人声分离
凤希AI's 人声分离 Splits Vocals From Instrumental
- 模型
- 音频
- 人声
- 伴奏
Stem separation inside ComfyUI is one of those things people ask for, get a working answer to, and then promptly stop asking about - because the answer is "yes, vocals versus instrumental, easily; anything more granular, use a dedicated audio app." That's the honest frame for 凤希AI - 人声分离 (FxAiMelRoformerSampler). Two outputs, no knobs, vocals on one wire and the backing track on the other.
Which is genuinely useful if you know why you want it. The reason to separate stems in a video workflow is dubbing: pull the vocal off a track, run it through RVC or a TTS clone, then lay the new voice back over the original instrumental so you keep the music and replace the singer. Same shape for lip-sync, or salvaging a clip whose dialogue is buried. If that's your job, this node plus the loader is a complete - if rigid - tool.
How it works
The sampler is a straight overlap-add implementation and there's nothing hidden in it.
Your input 音频 gets normalised first: mono is duplicated into stereo, and anything not already at 44100 Hz is resampled there. Both outputs come back at 44.1 kHz stereo regardless of what you fed in, which matters if you're stitching stems back against source audio at 48 kHz - resample on your side or accept the slight mismatch. Only the first item of a batch is processed; this is a single-track node.
Then it walks the waveform in overlapping chunks: C = 352800 samples (about eight seconds at 44.1 kHz), stepping forward by half a chunk, with the two ends reflect-padded. Each chunk gets a trapezoidal window with a fade of C/10, the model's output is multiplied by that window and accumulated into a vocal buffer, and the same window is accumulated into a counter buffer. At the end it divides one by the other. That's the standard trick for seamless chunked inference - every sample ends up as a weighted average of the chunks that covered it, so you don't get the little clicks and dropouts that naive chunking produces. Nothing to tune, and nothing that will surprise you at a boundary.
Vocals are that accumulated output. The second wire is simpler than you'd expect: 伴奏 is the resampled original minus the vocals, computed directly. So the two outputs always sum back to your input, exactly. There is no separate model for the backing track, no bleed control, no drum/bass/other split. It is a two-stem separator, full stop.
The model goes onto the GPU at the start of that loop and off to the offload device at the end. Nothing else is evicted for it - no free_memory call, no ComfyUI model management handshake. If you queue this while a video model is resident on the same card, you can absolutely OOM. Run it on its own queue, or free VRAM first.
Inputs and outputs
Two required inputs, no optionals, no parameters at all:
模型(MELROFORMERMODEL) - fromFxAiMelRoformerLoader, the only thing that produces this type.音频(AUDIO) - fromFxAiAudioSelector, or any other node emitting a stock ComfyUI audio dict.
And two outputs:
人声(AUDIO) - the vocal stem. This is the one you send to RVC, a TTS clone, or a lip-sync node.伴奏(AUDIO) - the instrumental. Keep it around; you'll want it for the re-mix.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/fxai666/fxai-toolkit
Restart ComfyUI, or use ComfyUI Manager and search fxai / 凤希全能节点. The pack auto-installs soundfile and psutil on startup, but this pair lives in fxai_melroformer.py, which imports the arch module - so make sure the arch dependencies are present:
python -m pip install einops rotary-embedding-torch
Your checkpoint goes in ComfyUI/models/diffusion_models - that's what the loader's dropdown reads. ffmpeg on PATH is required by the pack's audio routes.
Where people get burned
- The node isn't there at all. The loader and this sampler share one module and node imports are wrapped in try/except, so a missing
einopsorrotary_embedding_torchprints one❌[凤希AI] 节点加载失败line and registers neither node. Check the console before you check anything else. Missing key(s)at load time. The loader builds a fixed architecture and loads withstrict=True. A checkpoint from a different Mel-Band Roformer config won't fit. It's not a partial load; it fails.- OOM in the middle of a video workflow. See above - this sampler claims the GPU without negotiating with ComfyUI's memory manager.
- A long track feels slow and there's no UI feedback. It processes roughly eight-second chunks in a Python loop, sequentially. You get a progress bar in the console and a few Chinese
✅ [凤希AI]lines, and that's it. - Wanting four stems. You'll want a different tool. This does vocals and everything-else, and the everything-else is literally arithmetic.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| 模型 | MELROFORMERMODEL | — | |
| 音频 | AUDIO | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| 人声 | AUDIO | — |
| 伴奏 | AUDIO | — |