{"record":{"id":"d1b5c871db723c4a","repo":"sgl-project/sglang","slug":"h3-conditioning-projection-contains-unsupported-te","errorCode":null,"errorMessage":"H3 conditioning projection contains unsupported tensors: {sorted(tensors)}","messagePattern":"H3 conditioning projection contains unsupported tensors: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"critical","filePath":"python/sglang/multimodal_gen/runtime/models/encoders/minimax_h3_qwen3vl.py","lineNumber":147,"sourceCode":"        for layer_index in layer_indices:\n            weight_name = f\"mlp.{layer_index}.weight\"\n            bias_name = f\"mlp.{layer_index}.bias\"\n            weight = tensors.pop(weight_name)\n            bias = tensors.pop(bias_name, None)\n            if weight.ndim != 2 or int(weight.shape[1]) != layer_input_dim:\n                raise ValueError(\n                    f\"H3 conditioning projection {weight_name} cannot follow \"\n                    f\"width {layer_input_dim}: got {tuple(weight.shape)}\"\n                )\n            if bias is not None and tuple(bias.shape) != (int(weight.shape[0]),):\n                raise ValueError(\n                    f\"H3 conditioning projection {bias_name} has shape \"\n                    f\"{tuple(bias.shape)}, expected ({int(weight.shape[0])},)\"\n                )\n            layers.append(_FrozenLinear(weight, bias))\n            layer_input_dim = int(weight.shape[0])\n        if tensors:\n            raise ValueError(\n                \"H3 conditioning projection contains unsupported tensors: \"\n                f\"{sorted(tensors)}\"\n            )\n        if self.weight is None and not layers:\n            raise ValueError(\"H3 conditioning projection has neither W nor an MLP\")\n        if layers and layer_input_dim != self.output_dim:\n            raise ValueError(\n                f\"H3 conditioning projection MLP outputs width {layer_input_dim}, \"\n                f\"expected {self.output_dim}\"\n            )\n        if self.weight is not None and tuple(self.weight.shape) != (\n            self.input_dim,\n            self.output_dim,\n        ):\n            raise ValueError(\n                \"H3 conditioning projection W has shape \"\n                f\"{tuple(self.weight.shape)}, expected \"\n                f\"({self.input_dim}, {self.output_dim})\"","sourceCodeStart":129,"sourceCodeEnd":165,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/multimodal_gen/runtime/models/encoders/minimax_h3_qwen3vl.py#L129-L165","documentation":"The conditioning projection constructor found leftover tensors in the checkpoint state dict that it could not map to any known weight/bias/MLP pattern. After consuming recognized W, MLP, and normalization tensors, any remaining keys trigger this error listing the offenders.","triggerScenarios":"MiniMaxH3ConditioningProjection constructed with a state dict containing keys that don't match any recognized pattern (extra norms, unexpected prefixes, optimizer state, or renamed keys).","commonSituations":"Checkpoint format changed between releases, user exported a full model instead of just the projection module, or extra keys like 'norm.weight' variants with unknown prefixes were included.","solutions":["Inspect the tensor names listed in the error and strip or rename the unsupported ones before construction","Re-export only the projection submodule keys using the naming pattern expected by the loader","Check for a version mismatch between the checkpoint exporter and this sglang version"],"exampleFix":"# before\nproj = MiniMaxH3ConditioningProjection(sd, ...)\n# after\nsupported = {k: v for k, v in sd.items() if not k.startswith(\"unexpected_prefix.\")}\nproj = MiniMaxH3ConditioningProjection(supported, ...)","handlingStrategy":"validation","validationCode":"ALLOWED = re.compile(r\"^(W$|mlp\\..*weight$|mlp\\..*bias$|mean_in|std_in|mean_out|std_out|sink_out$)\")\nbad = [k for k in sd if not ALLOWED.match(k)]\nassert not bad, f\"unsupported tensors: {bad}\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Export projection state dicts from the module itself (module.state_dict()) to guarantee key names","Diff checkpoint keys against a known-good export before loading"],"tags":["minimax-h3","conditioning-projection","unsupported-tensors","checkpoint"],"backgroundTag":"checkpoint-key-mismatch","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}