Comfy-Org/ComfyUI · error · ValueError

Causal ResnetBlock with GroupNorm is not supported.

Error message

Causal ResnetBlock with GroupNorm is not supported.

What it means

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.

Source

Thrown at comfy/ldm/lightricks/vae/causal_audio_autoencoder.py:313


class ResnetBlock(nn.Module):
    def __init__(
        self,
        *,
        in_channels,
        out_channels=None,
        conv_shortcut=False,
        dropout,
        temb_channels=512,
        norm_type="group",
        causality_axis: CausalityAxis = CausalityAxis.HEIGHT,
    ):
        super().__init__()
        self.causality_axis = causality_axis

        if self.causality_axis != CausalityAxis.NONE and norm_type == "group":
            raise ValueError("Causal ResnetBlock with GroupNorm is not supported.")
        self.in_channels = in_channels
        out_channels = in_channels if out_channels is None else out_channels
        self.out_channels = out_channels
        self.use_conv_shortcut = conv_shortcut

        self.norm1 = Normalize(in_channels, normtype=norm_type)
        self.non_linearity = nn.SiLU()
        self.conv1 = make_conv2d(in_channels, out_channels, kernel_size=3, stride=1, causality_axis=causality_axis)
        if temb_channels > 0:
            self.temb_proj = ops.Linear(temb_channels, out_channels)
        self.norm2 = Normalize(out_channels, normtype=norm_type)
        self.dropout = torch.nn.Dropout(dropout)
        self.conv2 = make_conv2d(out_channels, out_channels, kernel_size=3, stride=1, causality_axis=causality_axis)
        if self.in_channels != self.out_channels:
            if self.use_conv_shortcut:
                self.conv_shortcut = make_conv2d(
                    in_channels, out_channels, kernel_size=3, stride=1, causality_axis=causality_axis
                )

View on GitHub (pinned to 1c6d8d45b3)

Solutions

  1. Use norm_type="pixel" for causal ResnetBlocks
  2. Or set causality_axis=CausalityAxis.NONE if causal convolutions are not required
  3. Check the audio VAE config's norm_type field when loading a checkpoint

Example fix

# before
block = ResnetBlock(ch, dropout=0.0, norm_type="group", causality_axis=CausalityAxis.HEIGHT)

# after
block = ResnetBlock(ch, dropout=0.0, norm_type="pixel", causality_axis=CausalityAxis.HEIGHT)
Defensive patterns

Strategy: validation

Validate before calling

if causality_axis != CausalityAxis.NONE and norm_type == "group":
    norm_type = "pixel"  # or fail fast with your own message

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of Comfy-Org/ComfyUI@1c6d8d45b3 (2026-08-14). Data as JSON: /api/errors/cbc5362ae0fb238d. Report an issue: GitHub.