{"record":{"id":"bd83eb5117355094","repo":"Comfy-Org/ComfyUI","slug":"block-with-block-type-is-not-supported","errorCode":null,"errorMessage":"Block with {block_type=} is not supported.","messagePattern":"Block with (.+?) is not supported\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"comfy/ldm/ace/vae/autoencoder_dc.py","lineNumber":318,"sourceCode":"    block_type: str,\n    in_channels: int,\n    out_channels: int,\n    attention_head_dim: int,\n    norm_type: str,\n    act_fn: str,\n    qkv_mutliscales: tuple = (),\n):\n    if block_type == \"ResBlock\":\n        block = ResBlock(in_channels, out_channels, norm_type, act_fn)\n    elif block_type == \"EfficientViTBlock\":\n        block = EfficientViTBlock(\n            in_channels,\n            attention_head_dim=attention_head_dim,\n            norm_type=norm_type,\n            qkv_multiscales=qkv_mutliscales\n        )\n    else:\n        raise ValueError(f\"Block with {block_type=} is not supported.\")\n\n    return block\n\n\nclass DCDownBlock2d(nn.Module):\n    def __init__(self, in_channels: int, out_channels: int, downsample: bool = False, shortcut: bool = True) -> None:\n        super().__init__()\n\n        self.downsample = downsample\n        self.factor = 2\n        self.stride = 1 if downsample else 2\n        self.group_size = in_channels * self.factor**2 // out_channels\n        self.shortcut = shortcut\n\n        out_ratio = self.factor**2\n        if downsample:\n            assert out_channels % out_ratio == 0\n            out_channels = out_channels // out_ratio","sourceCodeStart":300,"sourceCodeEnd":336,"githubUrl":"https://github.com/Comfy-Org/ComfyUI/blob/1c6d8d45b3693bfbb32385b410d813a7fd6be216/comfy/ldm/ace/vae/autoencoder_dc.py#L300-L336","documentation":"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.","triggerScenarios":"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.","commonSituations":"Loading a modified/newer ACE DC-VAE checkpoint with additional block types; case mismatch in config; configs ported from a different VAE implementation.","solutions":["Check the checkpoint config's block_type entries; fix case/typos to exactly ResBlock or EfficientViTBlock","Confirm you are loading a checkpoint actually built for this AutoencoderDC implementation (not a different VAE family)","If the checkpoint uses a genuinely new block, that block must be implemented in autoencoder_dc.py first"],"exampleFix":"# before (checkpoint config)\n\"block_type\": \"Resblock\"\n\n# after\n\"block_type\": \"ResBlock\"","handlingStrategy":"validation","validationCode":"SUPPORTED_BLOCKS = {\"ResBlock\", \"EfficientViTBlock\"}\nfor lvl in cfg['block_types']:\n    assert set(lvl) <= set(\"CA\") or all(b in SUPPORTED_BLOCKS for b in lvl)","typeGuard":"def is_supported_block(block_type: str) -> bool:\n    return block_type in {\"ResBlock\", \"EfficientViTBlock\"}","tryCatchPattern":null,"preventionTips":["Validate block_type fields from checkpoint configs against the factory's supported set","Keep a known-good config for each model family you load","Report unsupported block types with the full config context when filing issues"],"tags":["config","vae","architecture"],"backgroundTag":null,"analyzedSha":"1c6d8d45b3693bfbb32385b410d813a7fd6be216","analyzedAt":"2026-08-14T19:37:18.893Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}