hpcaitech/Open-Sora · error · NotImplementedError

ConvPixelShuffle upsample is not supported for video

Error message

ConvPixelShuffle upsample is not supported for video

What it means

ConvPixelShuffle upsampling is implemented only for 4D image tensors; constructing the DCAE decoder in video mode (is_video=True) with upsample_block_type='ConvPixelShuffle' raises NotImplementedError from build_upsample_block. Use the video-capable 'InterpolateConv' upsampler instead.

Source

Thrown at opensora/models/dc_ae/models/dc_ae.py:226

            in_channels=in_channels, out_channels=out_channels, factor=2, temporal_downsample=temporal_downsample
        )
        block = ResidualBlock(block, shortcut_block)
    else:
        raise ValueError(f"shortcut {shortcut} is not supported for downsample")
    return block


def build_upsample_block(
    block_type: str,
    in_channels: int,
    out_channels: int,
    shortcut: Optional[str],
    is_video: bool,
    temporal_upsample: bool = False,
) -> nn.Module:
    if block_type == "ConvPixelShuffle":
        if is_video:
            raise NotImplementedError("ConvPixelShuffle upsample is not supported for video")
        block = ConvPixelShuffleUpSampleLayer(
            in_channels=in_channels, out_channels=out_channels, kernel_size=3, factor=2
        )
    elif block_type == "InterpolateConv":
        block = InterpolateConvUpSampleLayer(
            in_channels=in_channels,
            out_channels=out_channels,
            kernel_size=3,
            factor=2,
            is_video=is_video,
            temporal_upsample=temporal_upsample,
        )
    else:
        raise ValueError(f"block_type {block_type} is not supported for upsampling")
    if shortcut is None:
        pass
    elif shortcut == "duplicating":
        shortcut_block = ChannelDuplicatingPixelShuffleUpSampleLayer(

View on GitHub (pinned to 7ad6a96a13)

Solutions

  1. Change upsample_block_type to 'InterpolateConv' (used by video configs)
  2. Use a video-specific DCAE config shipped with the repo
  3. Keep is_video=False for image-only workloads

Example fix

# before
upsample_block_type: ConvPixelShuffle  # is_video: true
# after
upsample_block_type: InterpolateConv
Defensive patterns

Strategy: validation

Validate before calling

if is_video:
    assert upsample_block_type != 'ConvPixelShuffle', 'ConvPixelShuffle upsample is image-only; use InterpolateConv'

Prevention

When it happens

Trigger: Configuring a video DCAE (is_video=True) whose decoder uses upsample_block_type: ConvPixelShuffle; reached via build_decoder_project_out_block and Decoder __init__.

Common situations: Loading an image dc_ae checkpoint config and flipping is_video on to process video; mixing image-architecture settings with video mode.

Related errors


AI-assisted analysis of hpcaitech/Open-Sora@7ad6a96a13 (2026-08-28). Data as JSON: /api/errors/d51f590367450614. Report an issue: GitHub.