{"record":{"id":"1bf354ef6713a8ba","repo":"sgl-project/sglang","slug":"auto-duration-was-requested-but-this-checkpoint-ha","errorCode":null,"errorMessage":"auto_duration was requested but this checkpoint has no duration head. It ships from LTX-2.5 onward.","messagePattern":"auto_duration was requested but this checkpoint has no duration head\\. It ships from LTX-2\\.5 onward\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/ltx_2/duration.py","lineNumber":55,"sourceCode":"        if self.duration_head is None:\n            return []\n        dtype = resolve_precision(\n            server_args, \"duration_head\", precision_attr=\"dit_precision\"\n        )\n        return [\n            ComponentUse(\n                self._component_stage_name(stage_name),\n                \"duration_head\",\n                target_dtype=dtype,\n            )\n        ]\n\n    def forward(self, batch: Req, server_args: ServerArgs) -> Req:\n        if not batch.auto_duration:\n            return batch\n\n        if self.duration_head is None:\n            raise ValueError(\n                \"auto_duration was requested but this checkpoint has no duration \"\n                \"head. It ships from LTX-2.5 onward.\"\n            )\n\n        video_tokens = batch.prompt_embeds\n        audio_tokens = batch.audio_prompt_embeds\n        if isinstance(video_tokens, list):\n            video_tokens = video_tokens[0]\n        if isinstance(audio_tokens, list):\n            audio_tokens = audio_tokens[0]\n\n        # A CFG batch carries [negative, positive] with duplicated rows, so\n        # predict from the first positive row only.\n        with (\n            self.use_declared_component(\n                component_name=\"duration_head\", module=self.duration_head\n            ) as duration_head,\n            torch.no_grad(),","sourceCodeStart":37,"sourceCodeEnd":73,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/ltx_2/duration.py#L37-L73","documentation":"The LTX-2 duration stage short-circuits unless batch.auto_duration is set; when it is set but the loaded checkpoint has no duration head (self.duration_head is None), automatic duration prediction is impossible and it raises, noting duration heads ship from LTX-2.5 onward.","triggerScenarios":"Setting auto_duration=True on a request while running a pre-LTX-2.5 checkpoint that lacks the duration head weights.","commonSituations":"Using a newer client/flag against an older LTX-2 checkpoint; enabling auto_duration globally while serving multiple checkpoints; checkpoint download missing the duration head module.","solutions":["Disable auto_duration for this checkpoint (unset the flag / set False)","Upgrade to an LTX-2.5+ checkpoint that includes the duration head","Verify the checkpoint actually loaded the duration head module (self.duration_head is not None) if you believe it should have one"],"exampleFix":"# before\nreq.auto_duration = True  # LTX-2.0 checkpoint -> raises\n# after\nreq.auto_duration = False\n# or serve an LTX-2.5+ checkpoint that has a duration head","handlingStrategy":"type-guard","validationCode":"if batch.auto_duration and stage.duration_head is None:\n    batch.auto_duration = False  # or raise with a clear message","typeGuard":"def supports_auto_duration(stage) -> bool:\n    return getattr(stage, \"duration_head\", None) is not None","tryCatchPattern":null,"preventionTips":["Gate auto_duration on checkpoint capability at request admission","Document which checkpoints carry the duration head"],"tags":["ltx-2","auto-duration","checkpoint-capability","version-mismatch"],"backgroundTag":"unsupported-feature-for-model-version","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}