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_ratioView on GitHub (pinned to 1c6d8d45b3)
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
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
- 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
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
- Unknown normalization type: {norm_type}
- Unknown activation type: {activation_type}
- Minimum cutoff must be larger than zero.
- A cutoff above 0.5 does not make sense.
- activation incorrectly specified. check the config file and
AI-assisted analysis of Comfy-Org/ComfyUI@1c6d8d45b3 (2026-08-14).
Data as JSON: /api/errors/bd83eb5117355094.
Report an issue: GitHub.