{"record":{"id":"2f8352bb0515bc9e","repo":"Comfy-Org/ComfyUI","slug":"norm-layer-norm-layer-is-not-implemented","errorCode":null,"errorMessage":"Norm layer {norm_layer} is not implemented","messagePattern":"Norm layer (.+?) is not implemented","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"comfy/ldm/wan/model_animate.py","lineNumber":92,"sourceCode":"        return x_local\n\n\ndef get_norm_layer(norm_layer, operations=None):\n    \"\"\"\n    Get the normalization layer.\n\n    Args:\n        norm_layer (str): The type of normalization layer.\n\n    Returns:\n        norm_layer (nn.Module): The normalization layer.\n    \"\"\"\n    if norm_layer == \"layer\":\n        return operations.LayerNorm\n    elif norm_layer == \"rms\":\n        return operations.RMSNorm\n    else:\n        raise NotImplementedError(f\"Norm layer {norm_layer} is not implemented\")\n\n\nclass FaceAdapter(nn.Module):\n    def __init__(\n        self,\n        hidden_dim: int,\n        heads_num: int,\n        qk_norm: bool = True,\n        qk_norm_type: str = \"rms\",\n        num_adapter_layers: int = 1,\n        dtype=None, device=None, operations=None\n    ):\n\n        factory_kwargs = {\"dtype\": dtype, \"device\": device}\n        super().__init__()\n        self.hidden_size = hidden_dim\n        self.heads_num = heads_num\n        self.fuser_blocks = nn.ModuleList(","sourceCodeStart":74,"sourceCodeEnd":110,"githubUrl":"https://github.com/Comfy-Org/ComfyUI/blob/1c6d8d45b3693bfbb32385b410d813a7fd6be216/comfy/ldm/wan/model_animate.py#L74-L110","documentation":"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.","triggerScenarios":"Constructing FaceAdapter with qk_norm_type set to something like \"ln\", \"l2\", \"ada-ln\", or \"none\" while qk_norm=True.","commonSituations":"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.","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."],"exampleFix":"# before\nFaceAdapter(hidden_dim, heads_num, qk_norm_type=\"ln\")\n# after\nFaceAdapter(hidden_dim, heads_num, qk_norm_type=\"rms\")","handlingStrategy":"validation","validationCode":"if qk_norm and qk_norm_type not in (\"layer\", \"rms\"):\n    raise ValueError(f\"unsupported qk_norm_type {qk_norm_type!r}; use 'layer' or 'rms'\")\nadapter = FaceAdapter(..., qk_norm_type=qk_norm_type)","typeGuard":"def is_supported_norm_type(t: str) -> bool:\n    return t in (\"layer\", \"rms\")","tryCatchPattern":null,"preventionTips":["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."],"tags":["wan","animate","norm-layer","not-implemented"],"backgroundTag":null,"analyzedSha":"1c6d8d45b3693bfbb32385b410d813a7fd6be216","analyzedAt":"2026-08-14T19:37:18.893Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}