{"record":{"id":"7f5cfec620bb93f4","repo":"hpcaitech/Open-Sora","slug":"shortcut-shortcut-is-not-supported-for-upsample","errorCode":null,"errorMessage":"shortcut {shortcut} is not supported for upsample","messagePattern":"shortcut (.+?) is not supported for upsample","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"opensora/models/dc_ae/models/dc_ae.py","lineNumber":249,"sourceCode":"        block = InterpolateConvUpSampleLayer(\n            in_channels=in_channels,\n            out_channels=out_channels,\n            kernel_size=3,\n            factor=2,\n            is_video=is_video,\n            temporal_upsample=temporal_upsample,\n        )\n    else:\n        raise ValueError(f\"block_type {block_type} is not supported for upsampling\")\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=2, temporal_upsample=temporal_upsample\n        )\n        block = ResidualBlock(block, shortcut_block)\n    else:\n        raise ValueError(f\"shortcut {shortcut} is not supported for upsample\")\n    return block\n\n\ndef build_encoder_project_in_block(\n    in_channels: int, out_channels: int, factor: int, downsample_block_type: str, is_video: bool\n):\n    if factor == 1:\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    elif factor == 2:","sourceCodeStart":231,"sourceCodeEnd":267,"githubUrl":"https://github.com/hpcaitech/Open-Sora/blob/7ad6a96a135feb81f755c84fb391818718f6beb2/opensora/models/dc_ae/models/dc_ae.py#L231-L267","documentation":"The upsample block supports only None and 'duplicating' (ChannelDuplicatingPixelShuffleUpSampleLayer) as shortcut modes. Other shortcut values are rejected with this ValueError when the decoder is built.","triggerScenarios":"Setting shortcut: 'identity' or another unsupported string on an upsample stage in the decoder config; called from Decoder __init__ and build_decoder_project_out_block.","commonSituations":"Hand-editing decoder stage configs; assuming shortcut vocabulary from the downsample path ('averaging') applies to upsampling.","solutions":["Set shortcut to null/None or 'duplicating' in the upsample stage config","Use an unmodified shipped config"],"exampleFix":"# before\nshortcut: averaging   # on an upsample stage\n# after\nshortcut: duplicating","handlingStrategy":"validation","validationCode":"assert shortcut in (None, 'duplicating'), f'unsupported upsample shortcut: {shortcut}'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate per-stage shortcut vocab","Document allowed values next to config templates"],"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"}