From 2e000a085783bc58e654845fa4529dd16109a35f Mon Sep 17 00:00:00 2001 From: Raymondlol <103474329+Raymondlol@users.noreply.github.com> Date: Sat, 15 Aug 2026 16:02:03 -0400 Subject: [PATCH] [Diffusion] Fail MiniMax-H3 quality="high" closed on substituted DiT weights validate_quality_deployment pins sixteen server args and the device, but none of them observes which DiT weights are resident, so the audited SSIM/PSNR promise stays attached to weights it was never measured on. Two CLI args substitute those weights and neither is checked. --lora-path: on the audited 4xH200 deployment, with the cookbook's own Turbo-LoRA recipe merged, quality="high" completes at the audited shape in 42.98 s against the 43.28 s the same tier takes on base weights, while the LoRA recipes section says that combination has not been quality-validated. --transformer-weights-path: quantization=None does not cover this. That field carries only the explicit --quantization override, whose help states the method is otherwise auto-detected from the checkpoint, and nothing writes the detected method back onto server_args. resolve_transformer_safetensors_to_load substitutes the entire transformer weight set whenever the path is set; when no quant config resolves, the transformer loader warns and proceeds. Both entries follow the existing one-line-per-field shape. This affects only quality="high": the validator runs under `if high_quality and not batch.is_warmup`, so lossless serving with a LoRA and the warmup path are unchanged. Closes #34954. Co-Authored-By: Claude Opus 5 --- .../configs/pipeline_configs/minimax_h3.py | 4 +++ .../test/unit/test_minimax_h3_admission.py | 28 +++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/python/sglang/multimodal_gen/configs/pipeline_configs/minimax_h3.py b/python/sglang/multimodal_gen/configs/pipeline_configs/minimax_h3.py index afb29a65d69c..9950e64420b8 100644 --- a/python/sglang/multimodal_gen/configs/pipeline_configs/minimax_h3.py +++ b/python/sglang/multimodal_gen/configs/pipeline_configs/minimax_h3.py @@ -119,6 +119,7 @@ def validate_quality_deployment(self, server_args) -> None: "is_dit_layerwise_offload_selected": ( server_args.is_dit_layerwise_offload_selected ), + "lora_path": server_args.lora_path, "model_variant": model_variant, "num_gpus": server_args.num_gpus, "performance_mode": server_args.performance_mode, @@ -127,6 +128,7 @@ def validate_quality_deployment(self, server_args) -> None: "ring_degree": server_args.ring_degree, "sp_degree": server_args.sp_degree, "tp_size": server_args.tp_size, + "transformer_weights_path": server_args.transformer_weights_path, "ulysses_degree": server_args.ulysses_degree, "use_fsdp_inference": server_args.use_fsdp_inference, } @@ -140,6 +142,7 @@ def validate_quality_deployment(self, server_args) -> None: "enable_breakable_cuda_graph": False, "enable_torch_compile": False, "is_dit_layerwise_offload_selected": False, + "lora_path": None, "model_variant": "fl2va", "num_gpus": 4, "performance_mode": "speed", @@ -148,6 +151,7 @@ def validate_quality_deployment(self, server_args) -> None: "ring_degree": 1, "sp_degree": 4, "tp_size": 1, + "transformer_weights_path": None, "ulysses_degree": 4, "use_fsdp_inference": False, } diff --git a/python/sglang/multimodal_gen/test/unit/test_minimax_h3_admission.py b/python/sglang/multimodal_gen/test/unit/test_minimax_h3_admission.py index 170f12bbda74..94eb83d8378c 100644 --- a/python/sglang/multimodal_gen/test/unit/test_minimax_h3_admission.py +++ b/python/sglang/multimodal_gen/test/unit/test_minimax_h3_admission.py @@ -248,12 +248,14 @@ def _quality_server_args(): enable_breakable_cuda_graph=False, enable_torch_compile=False, is_dit_layerwise_offload_selected=False, + lora_path=None, performance_mode="speed", quantization=None, regional_compile=False, ring_degree=1, sp_degree=4, tp_size=1, + transformer_weights_path=None, ulysses_degree=4, use_fsdp_inference=False, ) @@ -342,6 +344,32 @@ def test_quality_admission_fails_closed_outside_validated_request(): stage.forward(batch, server_args) +@pytest.mark.parametrize( + ("field", "value"), + [ + ("lora_path", "larryvrh/MiniMax-H3-Turbo-Lora"), + ("transformer_weights_path", "/weights/dit.safetensors"), + ], +) +def test_quality_admission_rejects_substituted_dit_weights(field, value): + config = MiniMaxH3PipelineConfig() + server_args = _quality_server_args() + + with ( + patch.object(current_platform, "is_cuda", return_value=True), + patch.object(current_platform, "get_device_name", return_value="NVIDIA H200"), + patch.object( + current_platform, + "get_device_capability", + return_value=_HopperCapability(), + ), + ): + config.validate_quality_deployment(server_args) + setattr(server_args, field, value) + with pytest.raises(ValueError, match=field): + config.validate_quality_deployment(server_args) + + def test_validate_server_args_requires_packed_varlen_backend(): config = SimpleNamespace( vae_config=SimpleNamespace(resolved_parallel_decode_mode=lambda: None),