Comfy-Org/ComfyUI · error · ValueError

Unknown model: {name}

Error message

Unknown model: {name}

What it means

Raised by get_my_vae in mmaudio/vae/vae.py when the requested VAE variant name is not '16k' or '44k'. The factory only ships two preset architectures (16k: data_dim 80, 44k: data_dim 128), and anything else — including plausible names like '48k' or '32k' — is rejected.

Source

Thrown at comfy/ldm/mmaudio/vae/vae.py:357

        h = nonlinearity(h)
        h = self.conv_out(h) * (self.learnable_gain + 1)
        return h


def VAE_16k(**kwargs) -> VAE:
    return VAE(data_dim=80, embed_dim=20, hidden_dim=384, **kwargs)


def VAE_44k(**kwargs) -> VAE:
    return VAE(data_dim=128, embed_dim=40, hidden_dim=512, **kwargs)


def get_my_vae(name: str, **kwargs) -> VAE:
    if name == '16k':
        return VAE_16k(**kwargs)
    if name == '44k':
        return VAE_44k(**kwargs)
    raise ValueError(f'Unknown model: {name}')

View on GitHub (pinned to 1c6d8d45b3)

Solutions

  1. Use '16k' or '44k' exactly
  2. Strip/normalize the string before passing it in
  3. Constrain the UI/combo options to the two valid names

Example fix

# before
vae = get_my_vae('48k')
# after
vae = get_my_vae('44k')
Defensive patterns

Strategy: type-guard

Validate before calling

name = name.strip().lower()
if name not in ('16k', '44k'):
    raise ValueError(f"VAE name must be '16k' or '44k', got {name!r}")
vae = get_my_vae(name)

Type guard

def is_valid_vae_name(name: str) -> bool:
    return isinstance(name, str) and name.strip().lower() in ('16k', '44k')

Prevention

When it happens

Trigger: Calling get_my_vae('48k'), get_my_vae('24k'), or passing an untrimmed string ('44k ') from a node dropdown or config.

Common situations: Assuming other MMAudio sample-rate VAEs exist; typos or whitespace in the name; wiring a UI combo value straight into the factory without validation.

Related errors


AI-assisted analysis of Comfy-Org/ComfyUI@1c6d8d45b3 (2026-08-14). Data as JSON: /api/errors/9a0a47241014667c. Report an issue: GitHub.