{"record":{"id":"5907f767bdfeff4e","repo":"sgl-project/sglang","slug":"rope-type-not-supported-choose-between-interl-5907f7","errorCode":null,"errorMessage":"{rope_type=} not supported. Choose between 'interleaved' and 'split'.","messagePattern":"(.+?) not supported\\. Choose between 'interleaved' and 'split'\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"critical","filePath":"python/sglang/multimodal_gen/runtime/models/dits/ltx_2.py","lineNumber":401,"sourceCode":"        base_height: int = 2048,\n        base_width: int = 2048,\n        sampling_rate: int = 16000,\n        hop_length: int = 160,\n        scale_factors: Tuple[int, ...] = (8, 32, 32),\n        theta: float = 10000.0,\n        causal_offset: int = 1,\n        modality: str = \"video\",\n        double_precision: bool = True,\n        rope_type: str = \"interleaved\",\n        num_attention_heads: int = 32,\n    ) -> None:\n        super().__init__()\n        self.dim = int(dim)\n        self.patch_size = int(patch_size)\n        self.patch_size_t = int(patch_size_t)\n\n        if rope_type not in [\"interleaved\", \"split\"]:\n            raise ValueError(\n                f\"{rope_type=} not supported. Choose between 'interleaved' and 'split'.\"\n            )\n        self.rope_type = rope_type\n\n        self.base_num_frames = int(base_num_frames)\n        self.num_attention_heads = int(num_attention_heads)\n\n        self.base_height = int(base_height)\n        self.base_width = int(base_width)\n\n        self.sampling_rate = int(sampling_rate)\n        self.hop_length = int(hop_length)\n        self.audio_latents_per_second = (\n            float(self.sampling_rate) / float(self.hop_length) / float(scale_factors[0])\n        )\n\n        self.scale_factors = tuple(int(x) for x in scale_factors)\n        self.theta = float(theta)","sourceCodeStart":383,"sourceCodeEnd":419,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/multimodal_gen/runtime/models/dits/ltx_2.py#L383-L419","documentation":"The LTX-2 rotary module supports exactly two layouts: 'interleaved' (pairs at stride 2) and 'split' (first-half/second-half). Any other rope_type string is rejected at init because the positional-encoding math differs per layout.","triggerScenarios":"Constructing LTX2RotaryPosEmbed with rope_type='concat', 'default', None, or a typo like 'splitt'.","commonSituations":"Porting config from another DiT whose rope naming differs; hand-written config JSON; case differences ('Split' vs 'split').","solutions":["Set rope_type to 'interleaved' or 'split' exactly","Match the value used during checkpoint training (wrong layout silently degrades quality even when it loads)","Add a config alias mapping if you control the loader"],"exampleFix":"// before\nrope = LTX2RotaryPosEmbed(..., rope_type=\"default\")\n\n// after\nrope = LTX2RotaryPosEmbed(..., rope_type=\"split\")","handlingStrategy":"validation","validationCode":"assert rope_type in ('interleaved', 'split'), f'{rope_type=} unsupported'","typeGuard":"def is_supported_rope_type(v: str) -> bool:\\n    return v in ('interleaved', 'split')","tryCatchPattern":null,"preventionTips":["Validate rope_type against checkpoint training config","Use exact lowercase strings","Add config linting for string enums"],"tags":["config-validation","rope","init-time","ltx2"],"backgroundTag":"unsupported-config-value","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}