Comfy-Org/ComfyUI · error · ValueError

SeedVR2 decoder only supports UpDecoderBlock3D, got {up_bloc

Error message

SeedVR2 decoder only supports UpDecoderBlock3D, got {up_block_type}.

What it means

The SeedVR2 VAE Decoder constructor iterates the configured up_block_types and hard-rejects anything except the literal string "UpDecoderBlock3D". SeedVR2's 3D decoder blocks are the only implementation wired up, so any other block type name is a configuration error, not a missing feature. The check fires per block during model construction, before any weights are loaded.

Source

Thrown at comfy/ldm/seedvr/vae.py:1253

            resnet_time_scale_shift="default",
            attention_head_dim=block_out_channels[-1],
            resnet_groups=norm_num_groups,
            temb_channels=temb_channels,
            add_attention=mid_block_add_attention,
            inflation_mode=inflation_mode,
            time_receptive_field=time_receptive_field,
        )

        reversed_block_out_channels = list(reversed(block_out_channels))
        output_channel = reversed_block_out_channels[0]
        for i, up_block_type in enumerate(up_block_types):
            prev_output_channel = output_channel
            output_channel = reversed_block_out_channels[i]

            is_final_block = i == len(block_out_channels) - 1
            is_temporal_up_block = i < self.temporal_up_num
            if up_block_type != "UpDecoderBlock3D":
                raise ValueError(f"SeedVR2 decoder only supports UpDecoderBlock3D, got {up_block_type}.")
            up_block = UpDecoderBlock3D(
                num_layers=self.layers_per_block + 1,
                in_channels=prev_output_channel,
                out_channels=output_channel,
                add_upsample=not is_final_block,
                resnet_eps=1e-6,
                resnet_groups=norm_num_groups,
                temb_channels=temb_channels,
                temporal_up=is_temporal_up_block,
                inflation_mode=inflation_mode,
                time_receptive_field=time_receptive_field,
            )
            self.up_blocks.append(up_block)
            prev_output_channel = output_channel

        self.conv_norm_out = ops.GroupNorm(
            num_channels=block_out_channels[0], num_groups=norm_num_groups, eps=1e-6
        )

View on GitHub (pinned to 1c6d8d45b3)

Solutions

  1. Set every entry in up_block_types to "UpDecoderBlock3D" (e.g. ["UpDecoderBlock3D"] * len(block_out_channels)).
  2. If porting a config from another VAE family, rebuild the decoder section for SeedVR2 instead of editing the old one.
  3. Validate config before construction: assert all(t == "UpDecoderBlock3D" for t in up_block_types).

Example fix

// before
up_block_types=["UpDecoderBlock2D", "UpDecoderBlock2D"]
// after
up_block_types=["UpDecoderBlock3D", "UpDecoderBlock3D"]
Defensive patterns

Strategy: validation

Validate before calling

def check_seedvr_up_blocks(up_block_types):
    bad = [t for t in up_block_types if t != "UpDecoderBlock3D"]
    if bad:
        raise ValueError(f"Unsupported up block types: {bad}; SeedVR2 requires UpDecoderBlock3D")

Prevention

When it happens

Trigger: Instantiating the SeedVR2 Decoder (comfy/ldm/seedvr/vae.py) with an up_block_types list containing anything other than "UpDecoderBlock3D" — e.g. a config ported from a 2D AutoencoderKL ("UpDecoderBlock2D", "UpDecoderBlockCX") or a typo.

Common situations: Copying a diffusers-style VAE config JSON into a SeedVR2 checkpoint config; hand-editing model config YAML; converting a 2D VAE checkpoint and reusing its block list.

Related errors


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