Nodes/ComfyUI_YuE/YUE_SM_Clip
ComfyUI Node

YUE_SM_Clip

The \"CLIP\" loader that's actually two music models

By smthemex·Created 2 years ago·Updated about 14 hours ago· 190
YUE_SM_Clip
    • clip
    clip
    mert2

    What this is

    Despite the name and the socket colour, there is no text encoder in here. YUE_SM_Clip loads SheetSage2, a music-understanding model that listens to a recording and writes out its melody as notation. It lands on a CLIP output because that's the socket-shaped hole in ComfyUI that fits "the model that produces conditioning" - the same trick Kijai's audio packs use.

    The only thing that consumes it is YUE_SM_Cond, and the only reason to load it is cover mode: you have a song, you want its melody transcribed, and you want to regenerate that melody with your own style and lyrics. For plain lyrics-to-song, skip this node entirely - audio generators don't need a text encoder the way image models do.

    Why it asks for two files

    This is the part that confuses everyone, and the source explains it. Two dropdowns, clip and mert2, and both list the same folder - ComfyUI/models/clip. They're not the same kind of thing at all.

    SheetSage2's public release is distributed as LoRA adapters, not a full model. So when you load it, the node inspects your safetensors: if the keys start with encoder. it's a merged snapshot and it builds the model directly; if they start with adapter. it builds the encoder skeleton, then needs a parent encoder to merge into - and that parent is MERT-v2-FullSong, which is what you point mert2 at. The merge runs in fp32 on CPU.

    Which means: the adapter path needs both files, and the MERT file has to be the FullSong revision. Pair it with MERT-v2-30s and you'll get a very unhelpful error about missing keys (the loader's message is in Chinese: parent weights incomplete, N keys missing). Merged-snapshot users can point both dropdowns at the same merged file.

    Output: a clip (CLIP) socket carrying the SheetSage2 model, straight into YUE_SM_Cond. That's the whole node - it doesn't transcribe anything by itself.

    Installing it

    Get the pack first, via ComfyUI Manager (search ComfyUI_YuE) or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/smthemex/ComfyUI_YuE
    pip install -r requirements.txt
    

    Then the two weight files, both into ComfyUI/models/clip/:

    ComfyUI/models/clip/sheetsage2.safetensors    # from m-a-p/SheetSage2 (model.safetensors)
    ComfyUI/models/clip/mert2_model.safetensors   # from m-a-p/MERT-v2-FullSong (model.safetensors)
    

    Only the .safetensors files are needed; the README is clear that the rest of the model repo isn't required because the code is bundled in the pack.

    Where people get burned

    • Both dropdowns show every file in models/clip. The pack can't tell your CLIP-L from a SheetSage2 checkpoint, so put unrelated clip/text-encoder files somewhere less cluttered or you'll scroll past twenty BERT-looking names to find two.
    • Dependency tension. SheetSage2's own requirements pin older transformers and NumPy (4.45.x / 1.24.x) while YuE2's runtime wants much newer ones, and upstream's guidance is to keep them in separate environments. This pack has to run both inside one ComfyUI install. If the cover nodes import fine but explode at transcribe time, that collision is the first suspect - and it's the number one reason the audio layer in ComfyUI is described as a maintained workaround rather than a feature.
    • It loads on CPU at fp32 and then gets pushed to the GPU by YUE_SM_Cond, which also has to build the full MERT parent encoder before merging. So the first cover of a session is slow and RAM-hungry before you've generated a single note. That's expected, not a bug.
    CategoryYUE_SM

    Inputs (2)

    NameTypeDefaultDescription
    clipCOMBO0 options:
    mert2COMBO0 options:

    Outputs (1)

    NameTypeDescription
    clipCLIP