Comfy-Org/ComfyUI · error · ValueError

Block with {block_type=} is not supported.

Error message

Block with {block_type=} is not supported.

What it means

Guard in comfy/ldm/ace/vae/autoencoder_dc.py's block factory: only ResBlock and EfficientViTBlock are constructible building blocks. A config naming any other block_type raises ValueError because the DC-VAE architecture has no implementation for it.

Source

Thrown at comfy/ldm/ace/vae/autoencoder_dc.py:318

    block_type: str,
    in_channels: int,
    out_channels: int,
    attention_head_dim: int,
    norm_type: str,
    act_fn: str,
    qkv_mutliscales: tuple = (),
):
    if block_type == "ResBlock":
        block = ResBlock(in_channels, out_channels, norm_type, act_fn)
    elif block_type == "EfficientViTBlock":
        block = EfficientViTBlock(
            in_channels,
            attention_head_dim=attention_head_dim,
            norm_type=norm_type,
            qkv_multiscales=qkv_mutliscales
        )
    else:
        raise ValueError(f"Block with {block_type=} is not supported.")

    return block


class DCDownBlock2d(nn.Module):
    def __init__(self, in_channels: int, out_channels: int, downsample: bool = False, shortcut: bool = True) -> None:
        super().__init__()

        self.downsample = downsample
        self.factor = 2
        self.stride = 1 if downsample else 2
        self.group_size = in_channels * self.factor**2 // out_channels
        self.shortcut = shortcut

        out_ratio = self.factor**2
        if downsample:
            assert out_channels % out_ratio == 0
            out_channels = out_channels // out_ratio

View on GitHub (pinned to 1c6d8d45b3)

Solutions

  1. Check the checkpoint config's block_type entries; fix case/typos to exactly ResBlock or EfficientViTBlock
  2. Confirm you are loading a checkpoint actually built for this AutoencoderDC implementation (not a different VAE family)
  3. If the checkpoint uses a genuinely new block, that block must be implemented in autoencoder_dc.py first

Example fix

# before (checkpoint config)
"block_type": "Resblock"

# after
"block_type": "ResBlock"
Defensive patterns

Strategy: validation

Validate before calling

SUPPORTED_BLOCKS = {"ResBlock", "EfficientViTBlock"}
for lvl in cfg['block_types']:
    assert set(lvl) <= set("CA") or all(b in SUPPORTED_BLOCKS for b in lvl)

Type guard

def is_supported_block(block_type: str) -> bool:
    return block_type in {"ResBlock", "EfficientViTBlock"}

Prevention

When it happens

Trigger: Building a DCDownBlock2d/DCUpBlock2d or the full AutoencoderDC from a config whose block_type string is something like 'Resblock', 'AttentionBlock', 'EfficientViT', or another architecture's block name.

Common situations: Loading a modified/newer ACE DC-VAE checkpoint with additional block types; case mismatch in config; configs ported from a different VAE implementation.

Related errors


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