hpcaitech/Open-Sora · error · ValueError
shortcut {shortcut} is not supported for decoder project in
Error message
shortcut {shortcut} is not supported for decoder project in What it means
The decoder project_in block supports only None and 'duplicating' shortcut modes. Any other shortcut value raises this ValueError when the Decoder is constructed.
Source
Thrown at opensora/models/dc_ae/models/dc_ae.py:333
block = ConvLayer(
in_channels=in_channels,
out_channels=out_channels,
kernel_size=3,
stride=1,
use_bias=True,
norm=None,
act_func=None,
is_video=is_video,
)
if shortcut is None:
pass
elif shortcut == "duplicating":
shortcut_block = ChannelDuplicatingPixelShuffleUpSampleLayer(
in_channels=in_channels, out_channels=out_channels, factor=1
)
block = ResidualBlock(block, shortcut_block)
else:
raise ValueError(f"shortcut {shortcut} is not supported for decoder project in")
return block
def build_decoder_project_out_block(
in_channels: int,
out_channels: int,
factor: int,
upsample_block_type: str,
norm: Optional[str],
act: Optional[str],
is_video: bool,
):
layers: list[nn.Module] = [
build_norm(norm, in_channels),
build_act(act),
]
if factor == 1:
layers.append(View on GitHub (pinned to 7ad6a96a13)
Solutions
- Set decoder project_in shortcut to null/None or 'duplicating'
- Use an unmodified shipped config
Example fix
# before shortcut: averaging # decoder project_in # after shortcut: duplicating
Defensive patterns
Strategy: validation
Validate before calling
assert shortcut in (None, 'duplicating'), f'unsupported decoder project_in shortcut: {shortcut}' Prevention
- Validate shortcut per block kind
- Use shipped configs
When it happens
Trigger: Setting decoder project_in shortcut to 'averaging', 'identity', or any string other than null/'duplicating' in the config.
Common situations: Mirroring encoder shortcut settings into the decoder; hand-modified configs.
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
- block_type {block_type} is not supported
- block_type {block_type} is not supported for downsampling
- shortcut {shortcut} is not supported for downsample
- block_type {block_type} is not supported for upsampling
- shortcut {shortcut} is not supported for upsample
AI-assisted analysis of hpcaitech/Open-Sora@7ad6a96a13 (2026-08-28).
Data as JSON: /api/errors/9ce747c3bfa8352a.
Report an issue: GitHub.