{"record":{"id":"3fc7d16e75d40fb0","repo":"Comfy-Org/ComfyUI","slug":"block-type-block-type-not-supported-3fc7d1","errorCode":null,"errorMessage":"Block type {block_type} not supported","messagePattern":"Block type (.+?) not supported","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"critical","filePath":"comfy/ldm/cascade/stage_c.py","lineNumber":78,"sourceCode":"        self.clip_norm = operations.LayerNorm(c_cond, elementwise_affine=False, eps=1e-6, dtype=dtype, device=device)\n\n        self.embedding = nn.Sequential(\n            nn.PixelUnshuffle(patch_size),\n            operations.Conv2d(c_in * (patch_size ** 2), c_hidden[0], kernel_size=1, dtype=dtype, device=device),\n            LayerNorm2d_op(operations)(c_hidden[0], elementwise_affine=False, eps=1e-6)\n        )\n\n        def get_block(block_type, c_hidden, nhead, c_skip=0, dropout=0, self_attn=True):\n            if block_type == 'C':\n                return ResBlock(c_hidden, c_skip, kernel_size=kernel_size, dropout=dropout, dtype=dtype, device=device, operations=operations)\n            elif block_type == 'A':\n                return AttnBlock(c_hidden, c_cond, nhead, self_attn=self_attn, dropout=dropout, dtype=dtype, device=device, operations=operations)\n            elif block_type == 'F':\n                return FeedForwardBlock(c_hidden, dropout=dropout, dtype=dtype, device=device, operations=operations)\n            elif block_type == 'T':\n                return TimestepBlock(c_hidden, c_r, conds=t_conds, dtype=dtype, device=device, operations=operations)\n            else:\n                raise Exception(f'Block type {block_type} not supported')\n\n        # BLOCKS\n        # -- down blocks\n        self.down_blocks = nn.ModuleList()\n        self.down_downscalers = nn.ModuleList()\n        self.down_repeat_mappers = nn.ModuleList()\n        for i in range(len(c_hidden)):\n            if i > 0:\n                self.down_downscalers.append(nn.Sequential(\n                    LayerNorm2d_op(operations)(c_hidden[i - 1], elementwise_affine=False, eps=1e-6),\n                    UpDownBlock2d(c_hidden[i - 1], c_hidden[i], mode='down', enabled=switch_level[i - 1], dtype=dtype, device=device, operations=operations)\n                ))\n            else:\n                self.down_downscalers.append(nn.Identity())\n            down_block = nn.ModuleList()\n            for _ in range(blocks[0][i]):\n                for block_type in level_config[i]:\n                    block = get_block(block_type, c_hidden[i], nhead[i], dropout=dropout[i], self_attn=self_attn[i])","sourceCodeStart":60,"sourceCodeEnd":96,"githubUrl":"https://github.com/Comfy-Org/ComfyUI/blob/1c6d8d45b3693bfbb32385b410d813a7fd6be216/comfy/ldm/cascade/stage_c.py#L60-L96","documentation":"Raised while building the Stage-C UNet of Stable Cascade: the per-level block string in the model config contains a letter other than 'C' (ResBlock), 'A' (AttnBlock), 'F' (FeedForwardBlock) or 'T' (TimestepBlock). The get_block factory inside StageC.__init__ walks every character of each level's block spec and hits the final else-branch. It means the loaded config does not match the architecture this file implements.","triggerScenarios":"Instantiating comfy.ldm.cascade.stage_c.StageC (usually indirectly via StageC_Coder / cascade checkpoint loading) with kwargs whose 'level_config' entries (e.g. [\"CVA\",\"CA\",\"CA\"]) contain an unexpected character, lowercase letters, or a typo like 'c' instead of 'C'.","commonSituations":"Hand-editing a Stable Cascade config dict when creating a custom StageC model; loading a modified/custom cascade checkpoint whose embedded config uses new block types not supported by this ComfyUI version; passing a config from a newer upstream version of the cascade code.","solutions":["Check the level_config strings passed into StageC and correct any invalid characters to the supported set C/A/F/T (uppercase only)","If the config came from a checkpoint, verify the checkpoint is a standard Stable Cascade Stage C model and not a newer architecture variant","Update ComfyUI if the block letter comes from a newer upstream cascade variant that this version does not know"],"exampleFix":"# before\nlevel_config = [\"cva\", \"CA\", \"CA\"]  # raises: Block type c not supported\n\n# after\nlevel_config = [[\"CVA\"], [\"CA\"], [\"CA\"]][0]  # use uppercase C/A/F/T letters","handlingStrategy":"validation","validationCode":"VALID = {\"C\", \"A\", \"F\", \"T\"}\ndef validate_cascade_config(level_config):\n    for level in level_config:\n        bad = set(level) - VALID\n        if bad:\n            raise ValueError(f\"Invalid StageC block letters {bad}; allowed: {VALID}\")","typeGuard":"def is_valid_stage_c_config(level_config) -> bool:\n    return all(ch in {\"C\", \"A\", \"F\", \"T\"} for level in level_config for ch in level)","tryCatchPattern":null,"preventionTips":["Never hand-edit Stable Cascade level_config strings; use configs from known-good checkpoints","Validate block strings against the C/A/F/T set before instantiating StageC"],"tags":["stable-cascade","stage-c","config","model-init","unet"],"backgroundTag":null,"analyzedSha":"1c6d8d45b3693bfbb32385b410d813a7fd6be216","analyzedAt":"2026-08-14T19:37:18.893Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}