{"record":{"id":"c12f839aa2d36658","repo":"sgl-project/sglang","slug":"h3-conditioning-projection-produced-no-output","errorCode":null,"errorMessage":"H3 conditioning projection produced no output","messagePattern":"H3 conditioning projection produced no output","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"python/sglang/multimodal_gen/runtime/models/encoders/minimax_h3_qwen3vl.py","lineNumber":186,"sourceCode":"\n    def forward(self, hidden_states: torch.Tensor) -> torch.Tensor:\n        if int(hidden_states.shape[-1]) != self.input_dim:\n            raise ValueError(\n                f\"H3 conditioning projection expects width {self.input_dim}, \"\n                f\"got {int(hidden_states.shape[-1])}\"\n            )\n        normalized = (hidden_states.float() - self.mean_in) / self.std_in\n        projected = normalized @ self.weight if self.weight is not None else None\n        if self.layers:\n            residual = normalized.to(self.layers[0].weight.dtype)\n            for index, layer in enumerate(self.layers):\n                residual = layer(residual)\n                if index + 1 < len(self.layers):\n                    residual = F.gelu(residual)\n            residual = residual.float()\n            projected = residual if projected is None else projected + residual\n        if projected is None:\n            raise RuntimeError(\"H3 conditioning projection produced no output\")\n        output = projected * self.std_out + self.mean_out\n        if self.sink_out is not None and int(output.shape[-2]) > 0:\n            output[..., 0, :] = self.sink_out\n        return output\n\n\nclass MiniMaxH3Qwen3VLEncoder(TextEncoder):\n    \"\"\"Qwen3-VL multimodal backbone producing MiniMax H3 conditioning.\n\n    The component loader builds and loads this module under the encoder-folding\n    TP group. A TP=1/SP=8 DiT deployment therefore shards the encoder over all\n    eight otherwise-idle ranks during encoding.\n    \"\"\"\n\n    # The inherited text-layer list covers Qwen's language stack; reference\n    # modes also execute the embedded visual tower.\n    layer_names = [\n        *TextEncoder.layer_names,","sourceCodeStart":168,"sourceCodeEnd":204,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/multimodal_gen/runtime/models/encoders/minimax_h3_qwen3vl.py#L168-L204","documentation":"RuntimeError raised when the conditioning projection forward produced no output: self.weight is None and self.layers is empty. Normally prevented by the constructor's error 1682, this guards against a module constructed in a degraded/invalid state.","triggerScenarios":"Calling forward() on a projection built without W or MLP layers (e.g. object created bypassing __init__ validation, or state mutated after construction).","commonSituations":"Rare defensive path; most commonly seen after manually constructing the module or after a failed/partial initialization swallowed earlier errors.","solutions":["Reconstruct the projection from a valid checkpoint and fix the underlying 1682 condition","Don't bypass __init__ (e.g. via pickle/deepcopy tricks) when cloning the module"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"assert proj.weight is not None or len(proj.layers) > 0, \"projection cannot produce output\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never bypass __init__ when cloning modules","Fail fast at construction on empty projections"],"tags":["minimax-h3","conditioning-projection","no-output","defensive"],"backgroundTag":"invalid-module-state","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}