sgl-project/sglang · critical · RuntimeError

MiniMax H3 tasks require the video_vae output decoder

Error message

MiniMax H3 tasks require the video_vae output decoder

What it means

MiniMaxH3DecodingStage.forward requires a video VAE decoder to decode visual latents; if the stage was constructed with video_vae=None it raises this RuntimeError before decoding.

Source

Thrown at python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/stages/decoding.py:370

            return {
                "waveform": waveform,
                "sample_rate": int(audio_vae.sample_rate),
            }

    @torch.no_grad()
    def forward(self, batch: Req, server_args: ServerArgs) -> OutputBatch:
        _minimax_h3_decoder_task(batch)
        visual_latent = _required_tensor(batch.latents, "batch.latents")
        audio_latent = _required_tensor(batch.audio_latents, "batch.audio_latents")
        if visual_latent.ndim != 5:
            raise ValueError("batch.latents must be [B, C, T, H, W]")
        if audio_latent.ndim != 3:
            raise ValueError(
                "batch.audio_latents must be [audio_channel, latent_dim, T]"
            )

        if self.video_vae is None:
            raise RuntimeError("MiniMax H3 tasks require the video_vae output decoder")
        with self.use_declared_component(
            component_name="video_vae",
            module=self.video_vae,
        ) as selected_video_vae:
            if selected_video_vae is None:
                raise RuntimeError("video_vae became unavailable during decode")
            self.video_vae = selected_video_vae
            if selected_video_vae.training:
                selected_video_vae.eval()
            visual_arch_config = server_args.pipeline_config.vae_config.arch_config
            visual_decode_latent = _reverse_normalize_latents(
                visual_latent,
                mean_values=visual_arch_config.latents_mean,
                std_values=visual_arch_config.latents_std,
                name="video_vae",
            )
            video_vae_dtype = resolve_decode_precision(server_args, "video_vae")
            visual_autocast_enabled = autocast_enabled_for_device(

View on GitHub (pinned to 0132848349)

Solutions

  1. Load and pass the video VAE module when constructing MiniMaxH3DecodingStage
  2. Check pipeline config / server_args.vae_config so the video VAE is instantiated
  3. If you intended audio-only decoding, use the audio path/stage rather than this stage's video branch

Example fix

# before
stage = MiniMaxH3DecodingStage(video_vae=None, audio_vae=audio_vae)
# after
stage = MiniMaxH3DecodingStage(video_vae=load_video_vae(), audio_vae=audio_vae)
Defensive patterns

Strategy: validation

Validate before calling

assert stage.video_vae is not None, "video VAE required before decode"

Type guard

def can_decode(stage) -> bool:
    return stage.video_vae is not None

Prevention

When it happens

Trigger: Instantiating MiniMaxH3DecodingStage without a video_vae module, or a pipeline config that omits/loads no video VAE.

Common situations: Building a decode-only pipeline and forgetting the video VAE; the VAE failing to load earlier and None being passed downstream; running an audio-only config against this combined stage.

Related errors


AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28). Data as JSON: /api/errors/23676755d2ea9218. Report an issue: GitHub.