sgl-project/sglang · critical · ValueError

H3 conditioning projection must output width {MINIMAX_H3_QWE

Error message

H3 conditioning projection must output width {MINIMAX_H3_QWEN3VL_HIDDEN_DIM}, got {output_dim}

What it means

The conditioning projection's output width must be exactly MINIMAX_H3_QWEN3VL_HIDDEN_DIM (the target model's hidden size). A different output width means the projected conditioning cannot be consumed downstream.

Source

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

                < MINIMAX_H3_QWEN3VL_SELECTED_LM_LAYER
            ):
                raise ValueError(
                    "MiniMax H3 Qwen3-VL encoders smaller than 32B require "
                    "--component-paths.conditioning_projection"
                )
            return

        projection_path = materialize_weight(resolve_weight(source))
        tap, input_dim, output_dim = MiniMaxH3ConditioningProjection.inspect(
            projection_path
        )
        if input_dim != int(arch.hidden_size):
            raise ValueError(
                f"H3 conditioning projection expects encoder width {input_dim}, "
                f"but the selected text encoder has width {int(arch.hidden_size)}"
            )
        if output_dim != MINIMAX_H3_QWEN3VL_HIDDEN_DIM:
            raise ValueError(
                f"H3 conditioning projection must output width "
                f"{MINIMAX_H3_QWEN3VL_HIDDEN_DIM}, got {output_dim}"
            )
        if tap <= 0 or tap > int(arch.checkpoint_num_hidden_layers):
            raise ValueError(
                f"H3 conditioning projection tap {tap} is outside the selected "
                f"encoder's {int(arch.checkpoint_num_hidden_layers)} layers"
            )
        arch.conditioning_projection_path = projection_path
        arch.num_hidden_layers = tap
        arch.text_config.num_hidden_layers = tap

    def should_materialize_checkpoint_weight(self, name: str) -> bool:
        name = _map_checkpoint_name(name)
        return (
            "rotary_emb.inv_freq" not in name
            and not _is_unconsumed_checkpoint_weight(name, self.selected_lm_layer)
        )

View on GitHub (pinned to 0132848349)

Solutions

  1. Supply the official projection checkpoint for the MiniMax H3 Qwen3-VL model being served
  2. Verify output_dim by loading the last weight and checking its shape[0] against the model hidden size
Defensive patterns

Strategy: validation

Validate before calling

_, _, out_dim = MiniMaxH3ConditioningProjection.inspect(path)
assert out_dim == MINIMAX_H3_QWEN3VL_HIDDEN_DIM

Prevention

When it happens

Trigger: configure_component_paths with a projection whose inspect() output_dim != MINIMAX_H3_QWEN3VL_HIDDEN_DIM.

Common situations: Projection checkpoint taken from a non-H3 or differently-sized model; truncated or wrong file passed as conditioning_projection.

Related errors


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