{"record":{"id":"2cb62b9bf589eb22","repo":"hpcaitech/Open-Sora","slug":"shortcut-shortcut-is-not-supported-for-encoder-p","errorCode":null,"errorMessage":"shortcut {shortcut} is not supported for encoder project out","messagePattern":"shortcut (.+?) is not supported for encoder project out","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"opensora/models/dc_ae/models/dc_ae.py","lineNumber":310,"sourceCode":"                out_channels=out_channels,\n                kernel_size=3,\n                stride=1,\n                use_bias=True,\n                norm=None,\n                act_func=None,\n                is_video=is_video,\n            ),\n        ]\n    )\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=1\n        )\n        block = ResidualBlock(block, shortcut_block)\n    else:\n        raise ValueError(f\"shortcut {shortcut} is not supported for encoder project out\")\n    return block\n\n\ndef build_decoder_project_in_block(in_channels: int, out_channels: int, shortcut: Optional[str], is_video: bool):\n    block = ConvLayer(\n        in_channels=in_channels,\n        out_channels=out_channels,\n        kernel_size=3,\n        stride=1,\n        use_bias=True,\n        norm=None,\n        act_func=None,\n        is_video=is_video,\n    )\n    if shortcut is None:\n        pass\n    elif shortcut == \"duplicating\":\n        shortcut_block = ChannelDuplicatingPixelShuffleUpSampleLayer(","sourceCodeStart":292,"sourceCodeEnd":328,"githubUrl":"https://github.com/hpcaitech/Open-Sora/blob/7ad6a96a135feb81f755c84fb391818718f6beb2/opensora/models/dc_ae/models/dc_ae.py#L292-L328","documentation":"The encoder project_out block supports only None and 'averaging' shortcut modes. Any other shortcut string in the encoder's project_out config raises this ValueError during Encoder construction.","triggerScenarios":"Setting project_out shortcut to a value other than null or 'averaging' (e.g. 'identity', 'duplicating') in the DCAE encoder config.","commonSituations":"Copy-pasting shortcut settings between encoder/decoder stages whose allowed vocabularies differ; hand-edited configs.","solutions":["Set the encoder project_out shortcut to null/None or 'averaging'","Validate the whole config against a shipped example before model init"],"exampleFix":"# before\nshortcut: duplicating   # encoder project_out\n# after\nshortcut: averaging","handlingStrategy":"validation","validationCode":"assert shortcut in (None, 'averaging'), f'unsupported encoder project_out shortcut: {shortcut}'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate shortcut per block kind","Keep a reference config and diff against it"],"tags":["config","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"}