{"record":{"id":"080d05317136ae27","repo":"hpcaitech/Open-Sora","slug":"block-type-block-type-is-not-supported","errorCode":null,"errorMessage":"block_type {block_type} is not supported","messagePattern":"block_type (.+?) is not supported","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"opensora/models/dc_ae/models/dc_ae.py","lineNumber":143,"sourceCode":"            stride=1,\n            use_bias=(True, False),\n            norm=(None, norm),\n            act_func=(act, None),\n            is_video=is_video,\n        )\n        block = ResidualBlock(main_block, IdentityLayer())\n    elif block_type == \"EViT_GLU\":\n        assert in_channels == out_channels\n        block = EfficientViTBlock(\n            in_channels, norm=norm, act_func=act, local_module=\"GLUMBConv\", scales=(), is_video=is_video\n        )\n    elif block_type == \"EViTS5_GLU\":\n        assert in_channels == out_channels\n        block = EfficientViTBlock(\n            in_channels, norm=norm, act_func=act, local_module=\"GLUMBConv\", scales=(5,), is_video=is_video\n        )\n    else:\n        raise ValueError(f\"block_type {block_type} is not supported\")\n    return block\n\n\ndef build_stage_main(\n    width: int, depth: int, block_type: str | list[str], norm: str, act: str, input_width: int, is_video: bool\n) -> list[nn.Module]:\n    assert isinstance(block_type, str) or (isinstance(block_type, list) and depth == len(block_type))\n    stage = []\n    for d in range(depth):\n        current_block_type = block_type[d] if isinstance(block_type, list) else block_type\n        block = build_block(\n            block_type=current_block_type,\n            in_channels=width if d > 0 else input_width,\n            out_channels=width,\n            norm=norm,\n            act=act,\n            is_video=is_video,\n        )","sourceCodeStart":125,"sourceCodeEnd":161,"githubUrl":"https://github.com/hpcaitech/Open-Sora/blob/7ad6a96a135feb81f755c84fb391818718f6beb2/opensora/models/dc_ae/models/dc_ae.py#L125-L161","documentation":"The deep-compression autoencoder block factory build_block does not recognize the requested block_type string. Supported names include variants like 'EViTS5_GLU'; anything else (typo, unsupported architecture, wrong config key) falls through to this ValueError at model construction time.","triggerScenarios":"Instantiating the DCAE encoder/decoder with a config whose block list contains an unknown string, e.g. 'ResBlock', 'EViTS4_GLU', or a misspelled 'EViTS5GLU'; build_stage_main calls build_block per configured block.","commonSituations":"Editing or hand-writing a dc_ae YAML/JSON config; porting configs from a different autoencoder repo whose block names differ; version skew where a config uses block names not yet present in this code version.","solutions":["Check the spelling against the supported list in build_block (e.g. 'EViTS5_GLU') and fix the config","Use a config shipped with the repo for the target model variant","Upgrade/downgrade opensora so its build_block supports the block names your config references"],"exampleFix":"# before\nblock_type: ['ResBlock', 'EViTS5_GLU']\n# after\nblock_type: ['EViTS5_GLU', 'EViTS5_GLU']","handlingStrategy":"validation","validationCode":"SUPPORTED_BLOCKS = {'EViTS5_GLU', ...}  # mirror build_block branches\nassert all(b in SUPPORTED_BLOCKS for b in cfg['block_type']), f'unsupported block(s): {set(cfg[\"block_type\"]) - SUPPORTED_BLOCKS}'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate block_type lists against a whitelist before model init","Use shipped configs as the source of truth","Add config schema validation at load time"],"tags":["config","model-construction","dc-ae","validation"],"backgroundTag":"invalid-config-value","analyzedSha":"7ad6a96a135feb81f755c84fb391818718f6beb2","analyzedAt":"2026-08-28T16:58:37.171Z","schemaVersion":2},"datasetVersion":"2026-08-28T21:17:43.275Z"}