{"record":{"id":"573ee021c6d437df","repo":"sgl-project/sglang","slug":"minimax-h3-adaln-cache-max-plan-width-must-be-posi","errorCode":null,"errorMessage":"MiniMax H3 AdaLN cache max_plan_width must be positive; set --minimax-h3-adaln-plan-width to at least 1","messagePattern":"MiniMax H3 AdaLN cache max_plan_width must be positive; set --minimax-h3-adaln-plan-width to at least 1","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/multimodal_gen/runtime/models/dits/minimax_h3.py","lineNumber":1153,"sourceCode":"        self,\n        arch: MiniMaxH3DiTArchConfig,\n        *,\n        path: str | None = None,\n        model_variant: str | None = None,\n        weight_files: list[str] | None = None,\n        max_plans: int = 64,\n        max_plan_width: int = MINIMAX_H3_ADALN_MAX_PLAN_WIDTH,\n    ) -> None:\n        super().__init__()\n        if (path is None) == (weight_files is None):\n            raise ValueError(\n                \"MiniMax H3 AdaLN cache takes exactly one of path (prebuilt \"\n                \"sidecar) or weight_files (rebuild from the checkpoint)\"\n            )\n        if max_plans < 1:\n            raise ValueError(\"MiniMax H3 AdaLN cache max_plans must be positive\")\n        if max_plan_width < 1:\n            raise ValueError(\n                \"MiniMax H3 AdaLN cache max_plan_width must be positive; \"\n                \"set --minimax-h3-adaln-plan-width to at least 1\"\n            )\n        self.path = path\n        self.model_variant = model_variant\n        self.weight_files = weight_files\n        self.max_plans = max_plans\n        self.max_plan_width = max_plan_width\n        self.num_layers = arch.num_layers\n        self.hidden_size = arch.hidden_size\n        self.block_width = 6 * MINIMAX_H3_ADALN_MODALITY_NUM * arch.hidden_size\n        self.final_width = 2 * arch.hidden_size\n        # Rebuild path only: plan bit pattern -> slot, tracked on the host.\n        self._slots: dict[tuple[int, ...], int] = {}\n        self.rebuilds = 0\n\n    def load(self, device: torch.device) -> None:\n        if self.path is None:","sourceCodeStart":1135,"sourceCodeEnd":1171,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/multimodal_gen/runtime/models/dits/minimax_h3.py#L1135-L1171","documentation":"max_plan_width controls the widest timestep plan the AdaLN cache supports (bounded by MINIMAX_H3_ADALN_MAX_PLAN_WIDTH) and must be at least 1. Zero or negative widths cannot represent any plan, so construction fails; the message points at the --minimax-h3-adaln-plan-width server flag.","triggerScenarios":"Starting with --minimax-h3-adaln-plan-width 0 (or negative), or constructing the cache with max_plan_width < 1 programmatically.","commonSituations":"A user sets the flag to 0 intending to disable planning instead of the supported way, or copies a config from another deployment with an incompatible value.","solutions":["Set --minimax-h3-adaln-plan-width to at least 1 (or omit it to use the default)","To disable the plan cache path entirely, use the weight_files/None configuration rather than zeroing width"],"exampleFix":"# before\n--minimax-h3-adaln-plan-width 0\n# after\n--minimax-h3-adaln-plan-width 64","handlingStrategy":"validation","validationCode":"plan_width = int(args.minimax_h3_adaln_plan_width)\nif plan_width < 1:\n    plan_width = MINIMAX_H3_ADALN_MAX_PLAN_WIDTH  # fall back to default","typeGuard":"def valid_plan_width(v: int) -> bool:\n    return isinstance(v, int) and v >= 1","tryCatchPattern":null,"preventionTips":["Range-check numeric server flags at parse time","Keep a config test asserting all default flags satisfy constructor constraints"],"tags":["minimax-h3","adaln-cache","server-args","argument-validation"],"backgroundTag":"invalid-argument-value","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}