{"record":{"id":"c5468f51bfa7be0f","repo":"hpcaitech/Open-Sora","slug":"upsample-during-project-out-is-not-supported-for-v","errorCode":null,"errorMessage":"Upsample during project_out is not supported for video","messagePattern":"Upsample during project_out is not supported for video","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"opensora/models/dc_ae/models/dc_ae.py","lineNumber":365,"sourceCode":"        build_norm(norm, in_channels),\n        build_act(act),\n    ]\n    if factor == 1:\n        layers.append(\n            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        )\n    elif factor == 2:\n        if is_video:\n            raise NotImplementedError(\"Upsample during project_out is not supported for video\")\n        layers.append(\n            build_upsample_block(\n                block_type=upsample_block_type, in_channels=in_channels, out_channels=out_channels, shortcut=None\n            )\n        )\n    else:\n        raise ValueError(f\"upsample factor {factor} is not supported for decoder project out\")\n    return OpSequential(layers)\n\n\nclass Encoder(nn.Module):\n    def __init__(self, cfg: EncoderConfig):\n        super().__init__()\n        self.cfg = cfg\n        num_stages = len(cfg.width_list)\n        self.num_stages = num_stages\n        assert len(cfg.depth_list) == num_stages\n        assert len(cfg.width_list) == num_stages","sourceCodeStart":347,"sourceCodeEnd":383,"githubUrl":"https://github.com/hpcaitech/Open-Sora/blob/7ad6a96a135feb81f755c84fb391818718f6beb2/opensora/models/dc_ae/models/dc_ae.py#L347-L383","documentation":"When the decoder's project_out upsamples by factor 2, it uses a pixel-shuffle upsampler that is not implemented for 5D video tensors; building a video DCAE with factor 2 project_out raises NotImplementedError. Video configs must use the video-capable project_out setting.","triggerScenarios":"Constructing a DCAE decoder with is_video=True and project_out_factor: 2; raised from build_decoder_project_out_block during Decoder __init__.","commonSituations":"Reusing image-checkpoint configs (which commonly use factor 2 project_out) with is_video enabled for video decoding.","solutions":["Set project_out_factor to a video-supported value (1, with the video conv path)","Use a video DCAE config shipped with the repo","Keep is_video=False for image decoding with factor 2"],"exampleFix":"# before\nproject_out_factor: 2   # with is_video: true\n# after\nproject_out_factor: 1","handlingStrategy":"validation","validationCode":"if is_video:\n    assert project_out_factor == 1, 'factor-2 project_out upsample is not implemented for video'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use video-specific configs","Cross-validate factor fields with is_video at load time"],"tags":["dc-ae","video","not-implemented","config"],"backgroundTag":"unsupported-operation-for-input-type","analyzedSha":"7ad6a96a135feb81f755c84fb391818718f6beb2","analyzedAt":"2026-08-28T16:58:37.171Z","schemaVersion":2},"datasetVersion":"2026-08-28T21:17:43.275Z"}