[Bugfix] Align MiniMax-H3 inference steps with denoiser evaluations (#7219)

Signed-off-by: zhuhh97 <zhuhonghan@huawei.com>
Co-authored-by: Gao Han <hgaoaf@connect.ust.hk>
This commit is contained in:
Honghan ZhuandGao Han authored and GitHub committed 2026-09-24 03:56:38 +00:00
1 parent 6daf5b30f0
commit 67aa30c966
10 files changed
+90 -40

No files matched your search

@@ -7,7 +7,7 @@ from contextlib import contextmanager, nullcontext
from multiprocessing.reduction import ForkingPickler
from types import SimpleNamespace
from typing import Any, TypeVar
from unittest.mock import Mock, patch
from unittest.mock import Mock, create_autospec, patch
import numpy as np
import pytest
@@ -947,7 +947,7 @@ def test_shifted_sigma_schedule_matches_reference_values():
minimax_h3_time_shift_sigmas,
)
sigmas = minimax_h3_time_shift_sigmas(num_steps=5, shift_scale=12.0)
sigmas = minimax_h3_time_shift_sigmas(num_steps=4, shift_scale=12.0)
assert sigmas == pytest.approx(
[1.0, 0.9729729891, 0.9230769277, 0.8000000119, 0.0],
@@ -955,6 +955,19 @@ def test_shifted_sigma_schedule_matches_reference_values():
)
@pytest.mark.parametrize("num_steps", [1, 8, 50])
@pytest.mark.parametrize("shift_scale", [3.0, 12.0])
def test_uniform_sigma_schedule_has_one_interval_per_requested_step(num_steps, shift_scale):
from vllm_omni.diffusion.models.minimax_h3.time_request import minimax_h3_time_shift_sigmas
sigmas = minimax_h3_time_shift_sigmas(num_steps=num_steps, shift_scale=shift_scale)
assert len(sigmas) == num_steps + 1
assert sigmas[0] == 1.0
assert sigmas[-1] == 0.0
assert all(current > following for current, following in zip(sigmas, sigmas[1:]))
def test_base_schedule_overrides_the_uniform_sigma_positions():
from vllm_omni.diffusion.models.minimax_h3.time_request import (
minimax_h3_time_shift_sigmas,
@@ -1751,12 +1764,14 @@ def test_text_encoder_rejects_serialized_fp8():
def test_text_encoder_linear_delegates_quantization_to_vllm_factory():
from vllm.model_executor.layers.linear import UnquantizedLinearMethod
from vllm.model_executor.layers.quantization.base_config import QuantizationConfig
import vllm_omni.diffusion.models.minimax_h3.encoder as encoder_module
group = SimpleNamespace(rank_in_group=0, world_size=1)
method = UnquantizedLinearMethod()
quant_config = Mock()
quant_config = create_autospec(QuantizationConfig, instance=True)
quant_config.online_quantization_config = None
quant_config.get_quant_method.return_value = method
# vLLM 0.30: no online quantization for this checkpoint-quantized layer
quant_config.online_quantization_config = None