Nodes/ComfyUI_YuE/YUE_SM_Vae
ComfyUI Node

YUE_SM_Vae

The small node that decides what your song sounds like

By smthemex·Created 2 years ago·Updated about 14 hours ago· 190
YUE_SM_Vae
    • vae
    vae

    What it is

    YUE_SM_Vae loads YuE2's audio decoder. That's the whole job. It has one dropdown, one output, and no settings - and it is still the node that determines how the finished song actually sounds, because it's the thing turning the model's acoustic latents into a stereo waveform.

    If you've only ever met a VAE in image workflows, here's the mapping: same idea, different modality. YuE2 doesn't decode to pixels, it decodes to 48 kHz stereo audio. The sampler can't finish a run without one, so this node is not optional in a YuE graph, the way a VAE loader isn't optional for a Z-Image or Wan pipeline.

    One thing that's genuinely a lever rather than plumbing: m-a-p publishes two YuE2 decoders. YuE2-Vae is the default listening decoder; YuE2-Vae-legacy is the benchmark decoder used for the recorded evaluations. Same latents, different sound - upstream's notes are explicit that you keep them separate and choose deliberately, "the release names determine these roles, not the everyday meaning of legacy." So which file you park in models/vae is a real decision, and worth an A/B on a finished seed.

    How it works

    The node calls YuE2VAE.from_pretrained() against the vae/ folder bundled inside the pack, passing your selected file as the checkpoint. That bundled folder holds the config and the Oobleck/SnakeBeta decoder code (derived from stable-audio-tools) - not the weights. Your vae.safetensors from m-a-p/YuE2-Vae is the weights.

    Two loading choices are baked in and are worth understanding. It loads decoder_only=True, so the encoder is never built - you're not paying memory for the half of the VAE that turns audio back into latents. And it insists on fp32: the loader raises if you hand it a quantized or half-precision dtype, with the message "The validated VAE requires FP32; quantize the LM separately." That's a deliberate accuracy choice for the decoder, not an oversight.

    Input and output are both boringly named: vae in (a dropdown over everything in ComfyUI/models/vae), vae out, wired to YUE_SM_Sampler's vae socket. That dropdown shows every VAE you own, so the picking mistake here is easy - an SDXL or Wan VAE is not going to decode music latents.

    Installing it

    It comes with the pack, so there's nothing separate to install:

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

    Then drop the weights in place:

    ComfyUI/models/vae/yue2_vae.safetensors   # from m-a-p/YuE2-Vae (model.safetensors, renamed)
    

    Where people get burned

    • Wrong file in the dropdown. Because the combo lists the whole models/vae directory, "my audio is a wall of noise / an error on load" is usually just an SD or video VAE selected by muscle memory. Load-time key errors mean the file isn't YuE2's decoder.
    • fp32 means real memory. The decoder isn't enormous, but it will not be squeezed into a quantized 4-bit slot no matter how much you'd like it to be.
    • Like every node in this pack, loading it clears ComfyUI's model cache first. If you VAE-swap mid-session expecting two decoders resident, you'll get reloads instead. Cheap here, but confusing if you're watching VRAM graphs.
    CategoryYUE_SM

    Inputs (1)

    NameTypeDefaultDescription
    vaeCOMBO0 options:

    Outputs (1)

    NameTypeDescription
    vaeVAE