Comfy-Org/ComfyUI · error · NotImplementedError
Norm layer {norm_layer} is not implemented
Error message
Norm layer {norm_layer} is not implemented What it means
In the Wan Animate face adapter, the qk-norm layer factory maps only "layer" (LayerNorm) and "rms" (RMSNorm); any other norm_layer string raises NotImplementedError. The adapter was built for exactly these two configs, so an unknown value signals a checkpoint config the code was never designed to load.
Source
Thrown at comfy/ldm/wan/model_animate.py:92
return x_local
def get_norm_layer(norm_layer, operations=None):
"""
Get the normalization layer.
Args:
norm_layer (str): The type of normalization layer.
Returns:
norm_layer (nn.Module): The normalization layer.
"""
if norm_layer == "layer":
return operations.LayerNorm
elif norm_layer == "rms":
return operations.RMSNorm
else:
raise NotImplementedError(f"Norm layer {norm_layer} is not implemented")
class FaceAdapter(nn.Module):
def __init__(
self,
hidden_dim: int,
heads_num: int,
qk_norm: bool = True,
qk_norm_type: str = "rms",
num_adapter_layers: int = 1,
dtype=None, device=None, operations=None
):
factory_kwargs = {"dtype": dtype, "device": device}
super().__init__()
self.hidden_size = hidden_dim
self.heads_num = heads_num
self.fuser_blocks = nn.ModuleList(View on GitHub (pinned to 1c6d8d45b3)
Solutions
- Use qk_norm_type="rms" (the default and what released checkpoints ship) or "layer".
- If the checkpoint truly uses a different norm, that model variant is unsupported — use the matching ComfyUI version or a converted checkpoint.
- Disable qk_norm only if the checkpoint actually has no qk-norm weights.
Example fix
# before FaceAdapter(hidden_dim, heads_num, qk_norm_type="ln") # after FaceAdapter(hidden_dim, heads_num, qk_norm_type="rms")
Defensive patterns
Strategy: validation
Validate before calling
if qk_norm and qk_norm_type not in ("layer", "rms"):
raise ValueError(f"unsupported qk_norm_type {qk_norm_type!r}; use 'layer' or 'rms'")
adapter = FaceAdapter(..., qk_norm_type=qk_norm_type) Type guard
def is_supported_norm_type(t: str) -> bool:
return t in ("layer", "rms") Prevention
- Keep the checkpoint's original config when loading Animate checkpoints.
- Treat an unrecognized norm name in a config as an unsupported variant, not a rename to guess.
When it happens
Trigger: Constructing FaceAdapter with qk_norm_type set to something like "ln", "l2", "ada-ln", or "none" while qk_norm=True.
Common situations: Loading a community fine-tune whose config renamed the norm type; hand-porting a config from another Wan variant that uses a different norm name.
Related errors
- ObjectPatchHook is not supported yet in ComfyUI.
- InjectionsHook is not supported yet in ComfyUI.
- Scalar feature is not implemented yet.
- Must flatten output.
- Temperature {temperature} is not supported.
AI-assisted analysis of Comfy-Org/ComfyUI@1c6d8d45b3 (2026-08-14).
Data as JSON: /api/errors/2f8352bb0515bc9e.
Report an issue: GitHub.