sgl-project/sglang · critical · RuntimeError
video_vae became unavailable during decode
Error message
video_vae became unavailable during decode
What it means
Inside the use_declared_component('video_vae') context the selected module must not be None; if component resolution yields None mid-decode (component released/unregistered concurrently) this RuntimeError fires.
Source
Thrown at python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/stages/decoding.py:376
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(
visual_latent, video_vae_dtype, server_args.disable_autocast
)
if visual_autocast_enabled:
selected_video_vae.prepare_decoder_autocast_weights(video_vae_dtype)
with autocast_context(
video_vae_dtype,View on GitHub (pinned to 0132848349)
Solutions
- Keep the video_vae component registered/alive for the lifetime of the decode call
- Avoid tearing down or mutating the component registry concurrently with inference
- File/inspect a race where the component lease is released early
Defensive patterns
Strategy: validation
Validate before calling
assert stage.video_vae is not None # and keep module referenced for the call duration
Prevention
- Don't unregister/release components concurrently with inference
- Hold a reference to the module across the decode call
When it happens
Trigger: The declared video_vae component being unset or garbage-collected/released by another thread while decode is in flight.
Common situations: Concurrent pipeline teardown or component hot-swap during generation; a bug where the component registry entry for video_vae was deleted before decoding finished.
Related errors
- MiniMax H3 tasks require the video_vae output decoder
- unsupported input for wan_rmsnorm_silu
- fl2va requires first_frame, last_frame, or both
- ref2va requires at least one of reference_image, reference_v
- t2va takes no conditioning inputs; pick another task
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/4b195404fb2500e0.
Report an issue: GitHub.