hpcaitech/Open-Sora · error · NotImplementedError

local_module {local_module} is not supported

Error message

local_module {local_module} is not supported

What it means

EfficientViTBlock supports only specific local_module names — 'MBConv', 'GLUMBConv' (and None/identity paths); anything else raises NotImplementedError in __init__. GLUMBConv is the local module used by the EViTS5_GLU blocks in the deep-compression autoencoder.

Source

Thrown at opensora/models/dc_ae/models/nn/ops.py:883

                    is_video=is_video,
                ),
                IdentityLayer(),
            )
        elif local_module == "GLUMBConv":
            self.local_module = ResidualBlock(
                GLUMBConv(
                    in_channels=in_channels,
                    out_channels=in_channels,
                    expand_ratio=expand_ratio,
                    use_bias=(True, True, False),
                    norm=(None, None, norm),
                    act_func=(act_func, act_func, None),
                    is_video=is_video,
                ),
                IdentityLayer(),
            )
        else:
            raise NotImplementedError(f"local_module {local_module} is not supported")

    def forward(self, x: torch.Tensor) -> torch.Tensor:
        x = self.context_module(x)
        x = self.local_module(x)
        return x


#################################################################################
#                             Functional Blocks                                 #
#################################################################################


class ResidualBlock(nn.Module):
    def __init__(
        self,
        main: Optional[nn.Module],
        shortcut: Optional[nn.Module],
        post_act=None,

View on GitHub (pinned to 7ad6a96a13)

Solutions

  1. Use 'MBConv' or 'GLUMBConv' (or the identity path) for local_module
  2. Rely on shipped configs; patch ops.py locally only if you implement a new local module
Defensive patterns

Strategy: validation

Validate before calling

assert local_module in (None, 'MBConv', 'GLUMBConv'), f'unsupported local_module: {local_module}'

Prevention

When it happens

Trigger: Setting local_module to an unsupported string (e.g. 'ConvNeXt', 'FFN', 'Conv3x3') in an EViTS block config during DCAE construction.

Common situations: Customizing block configs by hand; porting EfficientViT code/configs whose local-module vocabulary differs from this implementation.

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


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