Comfy-Org/ComfyUI · error · ValueError

unknown layer: {block_name}

Error message

unknown layer: {block_name}

What it means

Raised by the causal video autoencoder Decoder when an up_blocks config entry's name is not recognized by its builder chain (res_block, upsample, decompress_time, decompress_space, compress_all-related names, etc.). It is the Decoder counterpart of error 191: the block registry is closed.

Source

Thrown at comfy/ldm/lightricks/vae/causal_video_autoencoder.py:476

                block = DepthToSpaceUpsample(
                    dims=dims,
                    in_channels=input_channel,
                    stride=(1, 2, 2),
                    out_channels_reduction_factor=block_params.get("multiplier", 1),
                    spatial_padding_mode=spatial_padding_mode,
                )
            elif block_name == "compress_all":
                output_channel = output_channel // block_params.get("multiplier", 1)
                block = DepthToSpaceUpsample(
                    dims=dims,
                    in_channels=input_channel,
                    stride=(2, 2, 2),
                    residual=block_params.get("residual", False),
                    out_channels_reduction_factor=block_params.get("multiplier", 1),
                    spatial_padding_mode=spatial_padding_mode,
                )
            else:
                raise ValueError(f"unknown layer: {block_name}")

            self.up_blocks.append(block)

        if norm_layer == "group_norm":
            self.conv_norm_out = nn.GroupNorm(
                num_channels=output_channel, num_groups=norm_num_groups, eps=1e-6
            )
        elif norm_layer == "pixel_norm":
            self.conv_norm_out = PixelNorm()
        elif norm_layer == "layer_norm":
            self.conv_norm_out = LayerNorm(output_channel, eps=1e-6)

        self.conv_act = nn.SiLU()
        self.conv_out = make_conv_nd(
            dims,
            output_channel,
            out_channels,
            3,

View on GitHub (pinned to 1c6d8d45b3)

Solutions

  1. Fix the name to one supported by the builder (check the elif chain in causal_video_autoencoder.py around the raise)
  2. Update ComfyUI to a version matching the checkpoint
  3. Drop the unsupported block entry from the config

Example fix

# before
up_blocks = [{"block": [{"name": "upscale"}]}]

# after
up_blocks = [{"block": [{"name": "upsample"}]}]
Defensive patterns

Strategy: validation

Validate before calling

KNOWN_UP = {"res_block", "upsample", "decompress_time", "decompress_space", "compress_all"}
for lvl in config["up_blocks"]:
    for blk in lvl["block"]:
        if blk["name"] not in KNOWN_UP:
            raise ValueError(f"unsupported up block {blk['name']!r}; supported: {sorted(KNOWN_UP)}")

Prevention

When it happens

Trigger: Constructing Decoder with an up_blocks list containing an unknown name, e.g. {"name": "upsample2d"} or {"name": "decompress"}; usually sourced from the checkpoint config.

Common situations: Version skew: a newer LTX-family checkpoint config uses a block this ComfyUI build does not implement; hand-written decoder configs; typos.

Related errors


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