{"record":{"id":"cbc5362ae0fb238d","repo":"Comfy-Org/ComfyUI","slug":"causal-resnetblock-with-groupnorm-is-not-supported","errorCode":null,"errorMessage":"Causal ResnetBlock with GroupNorm is not supported.","messagePattern":"Causal ResnetBlock with GroupNorm is not supported\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"comfy/ldm/lightricks/vae/causal_audio_autoencoder.py","lineNumber":313,"sourceCode":"\n\nclass ResnetBlock(nn.Module):\n    def __init__(\n        self,\n        *,\n        in_channels,\n        out_channels=None,\n        conv_shortcut=False,\n        dropout,\n        temb_channels=512,\n        norm_type=\"group\",\n        causality_axis: CausalityAxis = CausalityAxis.HEIGHT,\n    ):\n        super().__init__()\n        self.causality_axis = causality_axis\n\n        if self.causality_axis != CausalityAxis.NONE and norm_type == \"group\":\n            raise ValueError(\"Causal ResnetBlock with GroupNorm is not supported.\")\n        self.in_channels = in_channels\n        out_channels = in_channels if out_channels is None else out_channels\n        self.out_channels = out_channels\n        self.use_conv_shortcut = conv_shortcut\n\n        self.norm1 = Normalize(in_channels, normtype=norm_type)\n        self.non_linearity = nn.SiLU()\n        self.conv1 = make_conv2d(in_channels, out_channels, kernel_size=3, stride=1, causality_axis=causality_axis)\n        if temb_channels > 0:\n            self.temb_proj = ops.Linear(temb_channels, out_channels)\n        self.norm2 = Normalize(out_channels, normtype=norm_type)\n        self.dropout = torch.nn.Dropout(dropout)\n        self.conv2 = make_conv2d(out_channels, out_channels, kernel_size=3, stride=1, causality_axis=causality_axis)\n        if self.in_channels != self.out_channels:\n            if self.use_conv_shortcut:\n                self.conv_shortcut = make_conv2d(\n                    in_channels, out_channels, kernel_size=3, stride=1, causality_axis=causality_axis\n                )","sourceCodeStart":295,"sourceCodeEnd":331,"githubUrl":"https://github.com/Comfy-Org/ComfyUI/blob/1c6d8d45b3693bfbb32385b410d813a7fd6be216/comfy/ldm/lightricks/vae/causal_audio_autoencoder.py#L295-L331","documentation":"Raised by ResnetBlock.__init__ in the causal audio autoencoder when causality_axis is non-NONE while norm_type is 'group'. GroupNorm statistics would mix information across time steps, violating causality, so the combination is rejected up front; causal blocks must use pixel norm.","triggerScenarios":"Constructing ResnetBlock(..., norm_type=\"group\", causality_axis=CausalityAxis.HEIGHT) (the default axis is HEIGHT, so simply omitting norm_type with a causal axis triggers it), including via Encoder/Decoder configs that set norm_type='group' with causal convolutions.","commonSituations":"Copying a non-causal VAE config (which uses GroupNorm) into the causal audio autoencoder without switching to pixel norm; omitting norm_type in configs because 'group' is the factory default.","solutions":["Use norm_type=\"pixel\" for causal ResnetBlocks","Or set causality_axis=CausalityAxis.NONE if causal convolutions are not required","Check the audio VAE config's norm_type field when loading a checkpoint"],"exampleFix":"# before\nblock = ResnetBlock(ch, dropout=0.0, norm_type=\"group\", causality_axis=CausalityAxis.HEIGHT)\n\n# after\nblock = ResnetBlock(ch, dropout=0.0, norm_type=\"pixel\", causality_axis=CausalityAxis.HEIGHT)","handlingStrategy":"validation","validationCode":"if causality_axis != CausalityAxis.NONE and norm_type == \"group\":\n    norm_type = \"pixel\"  # or fail fast with your own message","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Remember the default norm_type is 'group' and the default axis is HEIGHT — specify norm_type explicitly for causal blocks","Validate (norm_type, causality_axis) pairs against the support matrix before building the model"],"tags":["normalization","causal","resnet","audio-vae"],"backgroundTag":null,"analyzedSha":"1c6d8d45b3693bfbb32385b410d813a7fd6be216","analyzedAt":"2026-08-14T19:37:18.893Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}