sgl-project/sglang · critical · ValueError

H3 conditioning projection has neither W nor an MLP

Error message

H3 conditioning projection has neither W nor an MLP

What it means

The conditioning projection module was built with neither a direct W matrix nor any MLP layers — i.e. the provided tensors contained nothing usable for projection. This is a hard configuration error: the module cannot compute anything.

Source

Thrown at python/sglang/multimodal_gen/runtime/models/encoders/minimax_h3_qwen3vl.py:152

            if weight.ndim != 2 or int(weight.shape[1]) != layer_input_dim:
                raise ValueError(
                    f"H3 conditioning projection {weight_name} cannot follow "
                    f"width {layer_input_dim}: got {tuple(weight.shape)}"
                )
            if bias is not None and tuple(bias.shape) != (int(weight.shape[0]),):
                raise ValueError(
                    f"H3 conditioning projection {bias_name} has shape "
                    f"{tuple(bias.shape)}, expected ({int(weight.shape[0])},)"
                )
            layers.append(_FrozenLinear(weight, bias))
            layer_input_dim = int(weight.shape[0])
        if tensors:
            raise ValueError(
                "H3 conditioning projection contains unsupported tensors: "
                f"{sorted(tensors)}"
            )
        if self.weight is None and not layers:
            raise ValueError("H3 conditioning projection has neither W nor an MLP")
        if layers and layer_input_dim != self.output_dim:
            raise ValueError(
                f"H3 conditioning projection MLP outputs width {layer_input_dim}, "
                f"expected {self.output_dim}"
            )
        if self.weight is not None and tuple(self.weight.shape) != (
            self.input_dim,
            self.output_dim,
        ):
            raise ValueError(
                "H3 conditioning projection W has shape "
                f"{tuple(self.weight.shape)}, expected "
                f"({self.input_dim}, {self.output_dim})"
            )
        self.layers = nn.ModuleList(layers)

    def forward(self, hidden_states: torch.Tensor) -> torch.Tensor:
        if int(hidden_states.shape[-1]) != self.input_dim:

View on GitHub (pinned to 0132848349)

Solutions

  1. Verify the file actually contains projection weight tensors (load and list keys)
  2. Point --component-paths.conditioning_projection at the correct projection checkpoint
  3. If using a >=32B model where the projection is built-in, remove the override so the built-in path is used
Defensive patterns

Strategy: validation

Validate before calling

sd = torch.load(proj_path)
assert any(k.endswith("weight") for k in sd), "projection checkpoint has no weights"

Prevention

When it happens

Trigger: MiniMaxH3ConditioningProjection constructed with an empty state dict, or one containing only normalization statistics (mean/std) and no weight matrices.

Common situations: Empty or wrong safetensors file passed via --component-paths.conditioning_projection; pointing at a metadata-only file; the projection tensors were filtered out by a prefix handler.

Related errors


AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28). Data as JSON: /api/errors/8b735193a01abb17. Report an issue: GitHub.