Comfy-Org/ComfyUI · error · ValueError
Unknown normalization type: {norm_type}
Error message
Unknown normalization type: {norm_type} What it means
Factory guard in the ACE depth-conv VAE (comfy/ldm/ace/vae/autoencoder_dc.py): get_normalization() only constructs batch_norm, group_norm, layer_norm, and rms_norm. Any other norm_type string in the model config raises ValueError because no module can be built for the checkpoint's architecture description.
Source
Thrown at comfy/ldm/ace/vae/autoencoder_dc.py:36
def forward(self, x):
x = super().forward(x)
if self.elementwise_affine:
if self.bias is not None:
x = x + comfy.model_management.cast_to(self.bias, dtype=x.dtype, device=x.device)
return x
def get_normalization(norm_type, num_features, num_groups=32, eps=1e-5):
if norm_type == "batch_norm":
return nn.BatchNorm2d(num_features)
elif norm_type == "group_norm":
return ops.GroupNorm(num_groups, num_features)
elif norm_type == "layer_norm":
return ops.LayerNorm(num_features)
elif norm_type == "rms_norm":
return RMSNorm(num_features, eps=eps, elementwise_affine=True, bias=True)
else:
raise ValueError(f"Unknown normalization type: {norm_type}")
def get_activation(activation_type):
if activation_type == "relu":
return nn.ReLU()
elif activation_type == "relu6":
return nn.ReLU6()
elif activation_type == "silu":
return nn.SiLU()
elif activation_type == "leaky_relu":
return nn.LeakyReLU(0.2)
else:
raise ValueError(f"Unknown activation type: {activation_type}")
class ResBlock(nn.Module):
def __init__(
self,View on GitHub (pinned to 1c6d8d45b3)
Solutions
- Open the checkpoint's config and check the norm_type fields; map them to one of batch_norm|group_norm|layer_norm|rms_norm
- If the config uses a synonym (e.g. 'batchnorm'), correct it to the exact supported spelling
- If the checkpoint genuinely needs an unsupported norm, update this fork to handle it in get_normalization before loading
Example fix
# before (checkpoint config) "norm_type": "batchnorm" # after "norm_type": "batch_norm"
Defensive patterns
Strategy: validation
Validate before calling
SUPPORTED_NORMS = {"batch_norm", "group_norm", "layer_norm", "rms_norm"}
assert all(nt in SUPPORTED_NORMS for nt in cfg['norm_type'] if isinstance(nt, str)) or cfg['norm_type'] in SUPPORTED_NORMS Type guard
def is_supported_norm(norm_type: str) -> bool:
return norm_type in {"batch_norm", "group_norm", "layer_norm", "rms_norm"} Prevention
- Validate checkpoint config strings against the loader's supported set before building
- Keep a canonical copy of the original released config next to custom checkpoints
- Normalize/alias common synonyms (batchnorm->batch_norm) in your own export tooling
When it happens
Trigger: Building AutoencoderDC (or a block calling get_normalization) from a config whose norm_type is e.g. 'group_norm_32', 'BN', 'sync_batchnorm', or a typo like 'gruop_norm'. The value comes straight from the checkpoint's JSON config, not user node inputs.
Common situations: Loading a fine-tuned or community-modified ACE/DC-VAE checkpoint whose config was edited or came from a newer upstream that added a normalization type this code does not support; porting a diffusers AutoencoderDC config with renamed norm types.
Related errors
- Unknown activation type: {activation_type}
- Block with {block_type=} is not supported.
- Normalization {name} not found
- Normalization mode {self.qkv_norm_mode} not found, only supp
- Invalid normalization type: {normtype}
AI-assisted analysis of Comfy-Org/ComfyUI@1c6d8d45b3 (2026-08-14).
Data as JSON: /api/errors/0f71c439627a1959.
Report an issue: GitHub.