{"record":{"id":"9ce747c3bfa8352a","repo":"hpcaitech/Open-Sora","slug":"shortcut-shortcut-is-not-supported-for-decoder-p","errorCode":null,"errorMessage":"shortcut {shortcut} is not supported for decoder project in","messagePattern":"shortcut (.+?) is not supported for decoder project in","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"opensora/models/dc_ae/models/dc_ae.py","lineNumber":333,"sourceCode":"    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(\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 decoder project in\")\n    return block\n\n\ndef build_decoder_project_out_block(\n    in_channels: int,\n    out_channels: int,\n    factor: int,\n    upsample_block_type: str,\n    norm: Optional[str],\n    act: Optional[str],\n    is_video: bool,\n):\n    layers: list[nn.Module] = [\n        build_norm(norm, in_channels),\n        build_act(act),\n    ]\n    if factor == 1:\n        layers.append(","sourceCodeStart":315,"sourceCodeEnd":351,"githubUrl":"https://github.com/hpcaitech/Open-Sora/blob/7ad6a96a135feb81f755c84fb391818718f6beb2/opensora/models/dc_ae/models/dc_ae.py#L315-L351","documentation":"The decoder project_in block supports only None and 'duplicating' shortcut modes. Any other shortcut value raises this ValueError when the Decoder is constructed.","triggerScenarios":"Setting decoder project_in shortcut to 'averaging', 'identity', or any string other than null/'duplicating' in the config.","commonSituations":"Mirroring encoder shortcut settings into the decoder; hand-modified configs.","solutions":["Set decoder project_in shortcut to null/None or 'duplicating'","Use an unmodified shipped config"],"exampleFix":"# before\nshortcut: averaging   # decoder project_in\n# after\nshortcut: duplicating","handlingStrategy":"validation","validationCode":"assert shortcut in (None, 'duplicating'), f'unsupported decoder project_in shortcut: {shortcut}'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate shortcut per block kind","Use shipped configs"],"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"}