{"record":{"id":"a4cf1d762a931b62","repo":"sgl-project/sglang","slug":"minimax-h3-latent-preparation-requires-pre-queue-r-a4cf1d","errorCode":null,"errorMessage":"MiniMax H3 latent preparation requires pre-queue resolved temporal dimensions","messagePattern":"MiniMax H3 latent preparation requires pre-queue resolved temporal dimensions","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/stages/latent_preparation.py","lineNumber":87,"sourceCode":"        then audio rows, CPU fp32. Every task consumes the final latent grid\n        frozen by the pre-queue shape resolver.\"\"\"\n        from sglang.multimodal_gen.runtime.pipelines_core.stages.model_specific_stages.minimax_h3.constants import (\n            MINIMAX_H3_DENOISE_STATE_EXTRA_KEY,\n        )\n\n        if MINIMAX_H3_DENOISE_STATE_EXTRA_KEY in batch.extra:\n            return\n        shape = plan.shape\n        geometry = str(shape[\"geometry\"])\n        if geometry != \"resolved_v2\":\n            raise ValueError(\n                \"MiniMax H3 latent preparation requires pre-queue resolved_v2 \"\n                f\"geometry, got {geometry!r}\"\n            )\n        latent_h = int(shape[\"height\"]) // 16\n        latent_w = int(shape[\"width\"]) // 16\n        if shape.get(\"video_latent_t\") is None or shape.get(\"audio_latent_t\") is None:\n            raise ValueError(\n                \"MiniMax H3 latent preparation requires pre-queue resolved \"\n                \"temporal dimensions\"\n            )\n        latent_t = int(shape[\"video_latent_t\"])\n        audio_t = int(shape[\"audio_latent_t\"])\n\n        seed = plan.seed\n        if seed is None:\n            seed = 42  # pinned default seed\n        video_rows_n = latent_t * (latent_h // 2) * (latent_w // 2)\n        audio_rows_n = audio_t * 2\n        # Noise semantics:\n        # - video noise is drawn on the RAW latent tensor\n        #   [1, 24, T, H_lat, W_lat] in tensor layout, then patchified\n        #   into packed row order;\n        # - audio uses an INDEPENDENT generator re-seeded with the same\n        #   seed (each modality re-seeds its own generator);\n        # - no extra cond-frame noise is drawn for image-conditioned","sourceCodeStart":69,"sourceCodeEnd":105,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/stages/latent_preparation.py#L69-L105","documentation":"With resolved_v2 geometry confirmed, the stage requires both plan.shape['video_latent_t'] and plan.shape['audio_latent_t'] to be non-None, because it must know the temporal latent lengths to size the noise tensors. The error indicates the resolver did not (or could not) compute temporal dimensions for this request.","triggerScenarios":"_prepare_denoise_state_from_plan finds shape.get('video_latent_t') is None or shape.get('audio_latent_t') is None — e.g. duration unset in the request, a resolution path that skips temporal computation, or a v2 plan variant that omits audio latent_t.","commonSituations":"Requests without duration/fps information, resolver version mismatches where temporal fields were renamed, or video-only plans routed through a stage that assumes audio temporal dims exist.","solutions":["Ensure the request specifies duration/fps so the resolver computes video_latent_t and audio_latent_t","Upgrade the resolver/pre-queue stage to the version that emits both temporal fields under resolved_v2","Inspect plan.shape and re-resolve the request if either field is None"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if plan.shape.get(\"video_latent_t\") is None or plan.shape.get(\"audio_latent_t\") is None:\n    raise ValueError(\"request needs duration/fps so the resolver fills temporal dims\")","typeGuard":"def plan_has_temporal_dims(plan) -> bool:\n    return plan.shape.get(\"video_latent_t\") is not None and plan.shape.get(\"audio_latent_t\") is not None","tryCatchPattern":null,"preventionTips":["Include duration and fps in every video request","Log plan.shape after resolution to confirm temporal fields"],"tags":["minimax-h3","temporal-dimensions","plan-validation"],"backgroundTag":"missing-required-field","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}