Comfy-Org/ComfyUI · error · NotImplementedError
activation incorrectly specified. check the config file and
Error message
activation incorrectly specified. check the config file and look for 'activation'.
What it means
Raised by the BigVGAN AMPBlock1 (labeled line in mmaudio/vae/bigvgan.py) when h.activation is neither 'snake' nor 'snakebeta'. The activation name comes from the VAE hyperparameter config object h; any typo or unsupported activation aborts VAE construction with NotImplementedError.
Source
Thrown at comfy/ldm/mmaudio/vae/bigvgan.py:81
padding=get_padding(kernel_size, 1))
])
self.num_layers = len(self.convs1) + len(self.convs2) # total number of conv layers
if activation == 'snake': # periodic nonlinearity with snake function and anti-aliasing
self.activations = nn.ModuleList([
Activation1d(
activation=activations.Snake(channels, alpha_logscale=h.snake_logscale))
for _ in range(self.num_layers)
])
elif activation == 'snakebeta': # periodic nonlinearity with snakebeta function and anti-aliasing
self.activations = nn.ModuleList([
Activation1d(
activation=activations.SnakeBeta(channels, alpha_logscale=h.snake_logscale))
for _ in range(self.num_layers)
])
else:
raise NotImplementedError(
"activation incorrectly specified. check the config file and look for 'activation'."
)
def forward(self, x):
acts1, acts2 = self.activations[::2], self.activations[1::2]
for c1, c2, a1, a2 in zip(self.convs1, self.convs2, acts1, acts2):
xt = a1(x)
xt = c1(xt)
xt = a2(xt)
xt = c2(xt)
x = xt + x
return x
class AMPBlock2(torch.nn.Module):
def __init__(self, h, channels, kernel_size=3, dilation=(1, 3), activation=None):View on GitHub (pinned to 1c6d8d45b3)
Solutions
- Set h.activation to 'snake' or 'snakebeta' (lowercase, exact)
- If you edited the config, restore the original from the checkpoint
- Check for whitespace/case in the config string
Example fix
# before h.activation = 'Snake' # after h.activation = 'snake'
Defensive patterns
Strategy: validation
Validate before calling
if h.activation not in ('snake', 'snakebeta'):
raise ValueError(f"activation must be 'snake' or 'snakebeta', got {h.activation!r}") Type guard
def is_supported_activation(a: str) -> bool:
return a in ('snake', 'snakebeta') Prevention
- Validate the activation field once after loading the VAE config
- Keep config strings lowercase and exact
When it happens
Trigger: Building the MMAudio VAE with h.activation set to something like 'Snake', 'relu', 'mish', or missing so it falls to the else branch.
Common situations: Hand-editing the VAE config JSON; porting a BigVGAN config that uses a case variant or an activation this fork does not implement.
Related errors
- Unknown activation type: {activation_type}
- Minimum cutoff must be larger than zero.
- A cutoff above 0.5 does not make sense.
- Unknown model: {name}
- Unknown normalization type: {norm_type}
AI-assisted analysis of Comfy-Org/ComfyUI@1c6d8d45b3 (2026-08-14).
Data as JSON: /api/errors/8e1ad5f960ecae77.
Report an issue: GitHub.