Comfy-Org/ComfyUI · critical · Exception
Block type {block_type} not supported
Error message
Block type {block_type} not supported What it means
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.
Source
Thrown at comfy/ldm/cascade/stage_c.py:78
self.clip_norm = operations.LayerNorm(c_cond, elementwise_affine=False, eps=1e-6, dtype=dtype, device=device)
self.embedding = nn.Sequential(
nn.PixelUnshuffle(patch_size),
operations.Conv2d(c_in * (patch_size ** 2), c_hidden[0], kernel_size=1, dtype=dtype, device=device),
LayerNorm2d_op(operations)(c_hidden[0], elementwise_affine=False, eps=1e-6)
)
def get_block(block_type, c_hidden, nhead, c_skip=0, dropout=0, self_attn=True):
if block_type == 'C':
return ResBlock(c_hidden, c_skip, kernel_size=kernel_size, dropout=dropout, dtype=dtype, device=device, operations=operations)
elif block_type == 'A':
return AttnBlock(c_hidden, c_cond, nhead, self_attn=self_attn, dropout=dropout, dtype=dtype, device=device, operations=operations)
elif block_type == 'F':
return FeedForwardBlock(c_hidden, dropout=dropout, dtype=dtype, device=device, operations=operations)
elif block_type == 'T':
return TimestepBlock(c_hidden, c_r, conds=t_conds, dtype=dtype, device=device, operations=operations)
else:
raise Exception(f'Block type {block_type} not supported')
# BLOCKS
# -- down blocks
self.down_blocks = nn.ModuleList()
self.down_downscalers = nn.ModuleList()
self.down_repeat_mappers = nn.ModuleList()
for i in range(len(c_hidden)):
if i > 0:
self.down_downscalers.append(nn.Sequential(
LayerNorm2d_op(operations)(c_hidden[i - 1], elementwise_affine=False, eps=1e-6),
UpDownBlock2d(c_hidden[i - 1], c_hidden[i], mode='down', enabled=switch_level[i - 1], dtype=dtype, device=device, operations=operations)
))
else:
self.down_downscalers.append(nn.Identity())
down_block = nn.ModuleList()
for _ in range(blocks[0][i]):
for block_type in level_config[i]:
block = get_block(block_type, c_hidden[i], nhead[i], dropout=dropout[i], self_attn=self_attn[i])View on GitHub (pinned to 1c6d8d45b3)
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
Example fix
# before level_config = ["cva", "CA", "CA"] # raises: Block type c not supported # after level_config = [["CVA"], ["CA"], ["CA"]][0] # use uppercase C/A/F/T letters
Defensive patterns
Strategy: validation
Validate before calling
VALID = {"C", "A", "F", "T"}
def validate_cascade_config(level_config):
for level in level_config:
bad = set(level) - VALID
if bad:
raise ValueError(f"Invalid StageC block letters {bad}; allowed: {VALID}") Type guard
def is_valid_stage_c_config(level_config) -> bool:
return all(ch in {"C", "A", "F", "T"} for level in level_config for ch in level) Prevention
- 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
When it happens
Trigger: 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'.
Common situations: 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.
Related errors
- Hidden size {params.hidden_size} must be divisible by num_he
- Got {params.axes_dim} but expected positional dim {pe_dim}
- Hidden size {params.hidden_size} must be divisible by num_he
- Unsupported nerf_final_head_type {params.nerf_final_head_typ
- provide num_res_blocks either as an int (globally constant)
AI-assisted analysis of Comfy-Org/ComfyUI@1c6d8d45b3 (2026-08-14).
Data as JSON: /api/errors/3fc7d16e75d40fb0.
Report an issue: GitHub.