ComfyUI Node

PM VAE Loader

The model picker that quietly handles audio VAEs

By pixel-magician·Created 7 months ago·Updated 4 months ago· 0
PM VAE Loader
    • vae
    • model_name

    The VAE is the part of the pipeline nobody names in the prompt and everybody depends on: it's the autoencoder that turns the sampler's latent noise into actual pixels. PM VAE Loader is the PM Manager pack's version of the VAE loader, and on the surface it's the simplest node in the pack - pick a file, get a vae, wire it into VAE Decode. But there's one genuinely interesting thing buried in it that makes it more than a prettier dropdown.

    How it works

    Load a VAE and the pack does two extra things the core loader doesn't. First, it reads the safetensors metadata along with the weights. Second, it checks whether the file is an audio VAE - it looks at the model config, and if it finds both an audio_vae section and a vocoder section, it knows this isn't a normal image autoencoder.

    Why does that matter? Audio VAEs, the ones used by video models to generate sound, store their weights under a audio_vae. key prefix. ComfyUI's VAE code expects autoencoder.. If you loaded one naively, every key would be wrong and you'd get an error or garbage. This node detects the case and rewrites the state dict keys on the fly so the audio VAE loads cleanly. It's the kind of fix that, once you've fought a video model's audio side yourself, makes you appreciate the person who just handled it for you. If the file is a normal VAE, the prefix dance is skipped and it loads like any other.

    Inputs and outputs

    • No inputs in the schema - the whole selection happens through the pack's picker widget (with previews and folder organization, same as the other PM loaders).
    • vae - the loaded VAE, into VAE Decode to turn latents into pixels, or VAE Encode for img2img.
    • model_name - a * string with the VAE's filename, mostly for wiring into filename or metadata nodes.

    Installing it

    The standard pack install covers all eight nodes at once:

    cd ComfyUI/custom_nodes
    git clone https://github.com/pixel-magician/ComfyUI-PM-Manager.git
    # restart ComfyUI
    

    Or ComfyUI Manager, searching for ComfyUI-PM-Manager. Dependencies (opencv-python, imageio-ffmpeg) install alongside, and there are no model downloads - it reads VAEs from models/vae.

    Common issues

    The error you'll meet first is "No VAE model selected" - the picker widget came up empty, so refresh the browser tab and re-pick, and confirm the file is actually in models/vae. If a VAE won't load even after that, check the console for throw_exception_if_invalid firing, which means the file is corrupted or genuinely not a VAE it can use. And the pack-wide rule applies here too: this pack runs on ComfyUI's newer extension API, so if the node is missing entirely, update ComfyUI before you reinstall anything.

    CategoryPM Manager

    Inputs (0)

    No inputs

    Outputs (2)

    NameTypeDescription
    vaeVAE
    model_name*