Nodes/ComfyUI-VoiceSep/Load ClearVoice Model
ComfyUI Node

Load ClearVoice Model

One dropdown, and a checkpoint that downloads itself

By GuardSkill·Created 10 months ago·Updated 10 months ago· 1
Load ClearVoice Model
    • model
    model_nameMossFormer2_SS_16K

    "Load ClearVoice Model" is the boring half of the only useful pair this pack has. It has a single dropdown, a single choice, and its entire job is to give you a model object to hand to ClearVoice Speech Separation. Sounds pointless until you realize the interesting bit is what happens the first time you run it: the checkpoint is not bundled with the repo. It downloads itself.

    The model behind all of this is MossFormer2_SS_16K - that's Alibaba's 16 kHz two-speaker speech separation model, the same one that powers the "语音分离" module in ModelScope's ClearerVoice-Studio (the upstream project is modelscope/ClearerVoice-Studio). This ComfyUI pack is basically a thin wrapper around that studio's code, and the loader is where the wrapper does its one real trick.

    What actually happens when you run it

    The loader chdir's into the pack folder, spins up the ClearVoice wrapper in speech_separation mode, and then the network code takes over. It reads a config from config/inference/MossFormer2_SS_16K.yaml, which points checkpoints at models/clearvoice/MossFormer2_SS_16K inside the pack. Then it looks for a file called last_best_checkpoint. If it's not there - which it won't be on a fresh install - the code calls snapshot_download against Hugging Face's alibabasglab/MossFormer2_SS_16K and pulls the weights down automatically. First load takes a while and needs a network connection; every load after that is just weight loading and is fast.

    That means no manual model hunting, which is nice. It also means a few hundred MB you didn't ask for appears in ComfyUI/custom_nodes/ComfyUI-VoiceSep/models/ the first time you queue the graph. If the download ever fails, the code prints a warning with the manual URL (huggingface.co/alibabasglab/MossFormer2_SS_16K) and you can grab it yourself.

    One more honest detail: the loader grabs whichever GPU has the most free VRAM when CUDA is available, and falls back to CPU otherwise. Fine for a 24-layer MossFormer2 at 16 kHz.

    The inputs and outputs that matter

    There's exactly one input and it's not worth agonizing over:

    • model_name - an enum with a single value, MossFormer2_SS_16K. That's not a bug, that's the whole point: this pack only does two-speaker separation at 16 kHz, so you only ever get one choice.

    The single output is model (CLEARVOICE_MODEL), and it only plugs into one thing: the model input on ClearVoice Speech Separation. You don't inspect it, you don't save it, you just wire it across. ComfyUI will keep the model cached in memory between runs, so you don't pay the download/load cost every time you re-queue.

    Install and gotchas

    Via ComfyUI Manager, search "ComfyUI-VoiceSep" and install, or do it by hand:

    cd ComfyUI/custom_nodes
    git clone https://github.com/GuardSkill/ComfyUI-VoiceSep
    

    Then restart ComfyUI. The pack's requirements.txt pulls in a big pile - torchaudio, soundfile, librosa, scipy, numpy, einops, rotary_embedding_torch, opencv-python, scenedetect, pydub, and more. Most are probably already in your ComfyUI env.

    The trap to know about: the node source does import soxr at the top of the file, but soxr is not in requirements.txt. If you install via Manager and the import fails, the nodes never register and you'll wonder where they went. Fix it with pip install soxr (on some systems that needs libsoxr installed first).

    Also worth knowing before you bother: the README for this pack is nearly empty - it's a clone command and the phrase "separate two voices." There's no support culture here, so if something breaks you're reading the source. And since the loader has one choice and no settings, that's the whole config surface. The real knobs live in the separation node.

    Categoryaudio/clearvoice

    Inputs (1)

    NameTypeDefaultDescription
    model_nameCOMBOMossFormer2_SS_16K1 options: MossFormer2_SS_16K

    Outputs (1)

    NameTypeDescription
    modelCLEARVOICE_MODEL