Nodes/Pitch Mask Fallback/Pitch MMAudio Model Loader
ComfyUI Node

Pitch MMAudio Model Loader

The checkpoint loader at the head of ComfyUI's MMAudio foley chain

By pitch7900·Created 7 months ago·Updated 7 months ago· 0
Pitch MMAudio Model Loader
    • mmaudio_model
    mmaudio_model
    base_precisionfp16

    If you've ever finished a Wan or Hunyuan render and wished the silent clip could just have matching sound, MMAudio is the model people bolt on for exactly that - it's the community's foley workhorse, a flow-matching model that synthesizes audio to fit a video, with an optional text prompt steering what the sound is. PitchMMAudioModelLoader is the ComfyUI side of loading that model, and it's the first node in the four-node MMAudio chain this pack ships.

    It does one job and does it cleanly: it takes a trained MMAudio checkpoint and turns it into the custom MMAUDIO_MODEL type the sampler downstream expects. The dropdown reads from a ComfyUI/models/mmaudio folder that the node registers itself, so you drop model files in there and pick one.

    How it works

    The interesting part is what the loader figures out for you. MMAudio ships in two sizes (small and large) and two sampling modes (16k and 44k), and this node auto-detects both from the checkpoint's own weights - it reads the width of a projection layer to tell small from large, and checks for a v2 flag in another tensor. That means one loader handles all four official model variants without you configuring architecture details by hand.

    The two inputs that matter:

    • mmaudio_model (enum) - the checkpoint file, listed from ComfyUI/models/mmaudio.
    • base_precision (fp16 / fp32 / bf16, default fp16) - how the weights load. fp16 is the sensible default on a consumer card; drop to fp32 if you see precision-related noise, bf16 if your GPU handles it better.

    Output: mmaudio_model (MMAUDIO_MODEL) - wires straight into PitchMMAudioSampler.

    The gotcha that will bite you: the loader decides 16k vs 44k sequencing by looking at the filename - it checks for "44" or "16" in the model file name and picks the matching sequence config. If you rename your checkpoint to something that contains neither, the sampler has no sequence config and fails. Keep the official naming like mmaudio_large_44k.pth and you're fine; if you do rename files for organization, keep the 16k/44k marker in the name.

    Installing it

    This is one of four MMAudio nodes in the pitch7900/ComfyUI-PitchCustomNodes pack (alongside the two mask utilities). Install via ComfyUI Manager - search "Pitch Mask Fallback" - or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/pitch7900/ComfyUI-PitchCustomNodes
    

    Restart, then get the model files. The pack's README is empty, so here's what the source actually needs: download the MMAudio checkpoints (from the official MMAudio release, e.g. mmaudio_large_44k.pth or mmaudio_small_16k.pth) into ComfyUI/models/mmaudio. The dependencies - accelerate, open_clip_torch, huggingface_hub, omegaconf, einops - are installed by Manager; ComfyUI's own torch covers the rest.

    Common issues

    • "AttributeError: seq_cfg" on the sampler - almost always the filename problem above. Rename the checkpoint so 16 or 44 appears.
    • Nothing in the dropdown - files aren't in ComfyUI/models/mmaudio (note: the models folder at your ComfyUI root, not custom_nodes). Drop the files there and refresh the node.
    • Version-sensitive torch errors (the classic "torch.nn has no attribute Buffer") come from the underlying MMAudio code running on an old torch. ComfyUI installs track a modern torch by default, but if you've pinned it older, the whole audio chain breaks in ways that look like this loader's fault. Update torch before blaming the node.

    The heavy lifting - loading VAE, CLIP, Synchformer, and the vocoder - happens in the pack's PitchMMAudioFeatureUtilsLoader, which is your next node in this chain.

    CategoryPitch/Audio

    Inputs (2)

    NameTypeDefaultDescription
    mmaudio_modelCOMBOThese models are loaded from the 'ComfyUI/models/mmaudio' -folder
    base_precisionCOMBOfp163 options: fp16, fp32, bf16

    Outputs (1)

    NameTypeDescription
    mmaudio_modelMMAUDIO_MODEL