{"record":{"id":"024452bf42c42507","repo":"hpcaitech/Open-Sora","slug":"upsample-factor-factor-is-not-supported-for-deco","errorCode":null,"errorMessage":"upsample factor {factor} is not supported for decoder project out","messagePattern":"upsample factor (.+?) is not supported for decoder project out","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"opensora/models/dc_ae/models/dc_ae.py","lineNumber":372,"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    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\n        assert isinstance(cfg.block_type, str) or (\n            isinstance(cfg.block_type, list) and len(cfg.block_type) == num_stages\n        )\n\n        self.project_in = build_encoder_project_in_block(\n            in_channels=cfg.in_channels,\n            out_channels=cfg.width_list[0] if cfg.depth_list[0] > 0 else cfg.width_list[1],","sourceCodeStart":354,"sourceCodeEnd":390,"githubUrl":"https://github.com/hpcaitech/Open-Sora/blob/7ad6a96a135feb81f755c84fb391818718f6beb2/opensora/models/dc_ae/models/dc_ae.py#L354-L390","documentation":"build_decoder_project_out_block only supports project_out factors 1 and 2; any other factor value raises this ValueError when the decoder is constructed.","triggerScenarios":"Setting project_out_factor to 4, 8, or any value besides 1/2 in the DCAE decoder config.","commonSituations":"Attempting to match a different latent-compression scheme by editing the factor; config drift between opensora versions.","solutions":["Set project_out_factor to 1 or 2","Use a shipped config for the target checkpoint","Patch build_decoder_project_out_block locally if a new factor is genuinely required"],"exampleFix":"# before\nproject_out_factor: 4\n# after\nproject_out_factor: 2","handlingStrategy":"validation","validationCode":"assert project_out_factor in (1, 2), f'unsupported project_out factor: {project_out_factor}'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Whitelist factor values at config load","Validate decoder config schema before init"],"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"}