{"record":{"id":"cedf0d4aadd7a49d","repo":"hpcaitech/Open-Sora","slug":"block-type-block-type-is-not-supported-for-downs","errorCode":null,"errorMessage":"block_type {block_type} is not supported for downsampling","messagePattern":"block_type (.+?) is not supported for downsampling","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"opensora/models/dc_ae/models/dc_ae.py","lineNumber":203,"sourceCode":"            stride = 2\n        block = ConvLayer(\n            in_channels=in_channels,\n            out_channels=out_channels,\n            kernel_size=3,\n            stride=stride,\n            use_bias=True,\n            norm=None,\n            act_func=None,\n            is_video=is_video,\n        )\n    elif block_type == \"ConvPixelUnshuffle\":\n        if is_video:\n            raise NotImplementedError(\"ConvPixelUnshuffle downsample is not supported for video\")\n        block = ConvPixelUnshuffleDownSampleLayer(\n            in_channels=in_channels, out_channels=out_channels, kernel_size=3, factor=2\n        )\n    else:\n        raise ValueError(f\"block_type {block_type} is not supported for downsampling\")\n    if shortcut is None:\n        pass\n    elif shortcut == \"averaging\":\n        shortcut_block = PixelUnshuffleChannelAveragingDownSampleLayer(\n            in_channels=in_channels, out_channels=out_channels, factor=2, temporal_downsample=temporal_downsample\n        )\n        block = ResidualBlock(block, shortcut_block)\n    else:\n        raise ValueError(f\"shortcut {shortcut} is not supported for downsample\")\n    return block\n\n\ndef build_upsample_block(\n    block_type: str,\n    in_channels: int,\n    out_channels: int,\n    shortcut: Optional[str],\n    is_video: bool,","sourceCodeStart":185,"sourceCodeEnd":221,"githubUrl":"https://github.com/hpcaitech/Open-Sora/blob/7ad6a96a135feb81f755c84fb391818718f6beb2/opensora/models/dc_ae/models/dc_ae.py#L185-L221","documentation":"build_downsample_block received an unknown downsample block_type string. Recognized types are the conv-based downsampler and 'ConvPixelUnshuffle'; anything else is rejected with this ValueError during model construction.","triggerScenarios":"Passing downsample_block_type values like 'PixelShuffle', 'pool', or a typo via the DCAE config into Encoder/Decoder __init__ or build_encoder_project_in_block.","commonSituations":"Hand-edited configs, configs ported from other repos, or version mismatches where the expected block name changed between releases.","solutions":["Verify the downsample_block_type string against the branches in build_downsample_block and correct it","Start from a repo-shipped config for your model variant","Match your opensora version to the config's origin version"],"exampleFix":"# before\ndownsample_block_type: pixel_unshuffle\n# after\ndownsample_block_type: ConvPixelUnshuffle","handlingStrategy":"validation","validationCode":"SUPPORTED_DOWN = {'Conv', 'ConvPixelUnshuffle'}  # mirror build_downsample_block\nassert cfg['downsample_block_type'] in SUPPORTED_DOWN, cfg['downsample_block_type']","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Whitelist-check downsample block names at config load","Pin config and code versions together"],"tags":["config","dc-ae","validation","model-construction"],"backgroundTag":"invalid-config-value","analyzedSha":"7ad6a96a135feb81f755c84fb391818718f6beb2","analyzedAt":"2026-08-28T16:58:37.171Z","schemaVersion":2},"datasetVersion":"2026-08-28T21:17:43.275Z"}