{"record":{"id":"1e3559792d3e4feb","repo":"Comfy-Org/ComfyUI","slug":"seedvr2-encoder-only-supports-downencoderblock3d","errorCode":null,"errorMessage":"SeedVR2 encoder only supports DownEncoderBlock3D, got {down_block_type}.","messagePattern":"SeedVR2 encoder only supports DownEncoderBlock3D, got (.+?)\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"comfy/ldm/seedvr/vae.py","lineNumber":1138,"sourceCode":"            block_out_channels[0],\n            kernel_size=3,\n            stride=1,\n            padding=1,\n            inflation_mode=inflation_mode,\n        )\n\n        self.mid_block = None\n        self.down_blocks = nn.ModuleList([])\n\n        output_channel = block_out_channels[0]\n        for i, down_block_type in enumerate(down_block_types):\n            input_channel = output_channel\n            output_channel = block_out_channels[i]\n            is_final_block = i == len(block_out_channels) - 1\n            is_temporal_down_block = i >= len(block_out_channels) - self.temporal_down_num - 1\n\n            if down_block_type != \"DownEncoderBlock3D\":\n                raise ValueError(f\"SeedVR2 encoder only supports DownEncoderBlock3D, got {down_block_type}.\")\n\n            down_block = DownEncoderBlock3D(\n                num_layers=self.layers_per_block,\n                in_channels=input_channel,\n                out_channels=output_channel,\n                add_downsample=not is_final_block,\n                resnet_eps=1e-6,\n                resnet_groups=norm_num_groups,\n                temporal_down=is_temporal_down_block,\n                spatial_down=True,\n                inflation_mode=inflation_mode,\n                time_receptive_field=time_receptive_field,\n            )\n            self.down_blocks.append(down_block)\n\n        self.mid_block = UNetMidBlock3D(\n            in_channels=block_out_channels[-1],\n            resnet_eps=1e-6,","sourceCodeStart":1120,"sourceCodeEnd":1156,"githubUrl":"https://github.com/Comfy-Org/ComfyUI/blob/1c6d8d45b3693bfbb32385b410d813a7fd6be216/comfy/ldm/seedvr/vae.py#L1120-L1156","documentation":"The SeedVR2 VAE encoder constructor iterates down_block_types and only accepts the literal \"DownEncoderBlock3D\" — the single 3D ResNet block type this implementation provides. Any other block name (e.g. diffusers' \"DownEncoderBlock2D\" or a typo) raises during construction. This is a config-surface restriction of ComfyUI's SeedVR2 port, not a data-dependent error.","triggerScenarios":"Constructing SeedVR2Encoder with a down_block_types list containing anything other than \"DownEncoderBlock3D\" — typically a config copied from a diffusers image VAE (DownEncoderBlock2D) or hand-written with a typo.","commonSituations":"Reusing a Stable Diffusion VAE config as a template for SeedVR2; converting configs from another repo whose block names differ; LLM-assisted config generation inventing block names.","solutions":["Set every entry of down_block_types to \"DownEncoderBlock3D\" (one per block_out_channels entry).","Start from the SeedVR2 checkpoint's embedded config instead of an unrelated VAE config.","Remove custom block-type entries — this encoder has no 2D or attention down-block variants.","Verify the list length matches block_out_channels after fixing entries."],"exampleFix":"# before\ndown_block_types=(\"DownEncoderBlock2D\", \"DownEncoderBlock2D\")\n# after\ndown_block_types=(\"DownEncoderBlock3D\", \"DownEncoderBlock3D\")","handlingStrategy":"validation","validationCode":"VALID_DOWN_BLOCKS = {\"DownEncoderBlock3D\"}\n\ndef validate_down_block_types(down_block_types):\n    for bt in down_block_types:\n        if bt not in VALID_DOWN_BLOCKS:\n            raise ValueError(f\"{bt!r} unsupported; SeedVR2 encoder accepts only 'DownEncoderBlock3D'\")\n    return down_block_types","typeGuard":"def is_valid_down_block_type(name) -> bool:\n    return name == \"DownEncoderBlock3D\"","tryCatchPattern":null,"preventionTips":["Start SeedVR2 VAE configs from the checkpoint's embedded config, not from an SD VAE template.","Validate block type names against the allowed set before constructing the encoder.","Keep len(down_block_types) == len(block_out_channels)."],"tags":["seedvr2","vae","config","encoder","validation"],"backgroundTag":null,"analyzedSha":"1c6d8d45b3693bfbb32385b410d813a7fd6be216","analyzedAt":"2026-08-14T19:37:18.893Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}