[Diffusion] [NPU] Wan2.2-T2V-A14B-Diffusers modelslim quantization support (#17996)

Co-authored-by: ronnie_zheng <zl19940307@163.com>
This commit is contained in:
Артем Савкин
2026-03-07 17:26:44 +03:00
committed by GitHub
co-authored by ronnie_zheng
parent f8d4eb7022
commit 5297b02c88
19 changed files with 808 additions and 166 deletions
@@ -61,6 +61,10 @@ suites_ascend = {
"ascend/test_server_2_npu.py",
# add new 2-npu test files here
],
"8-npu": [
"ascend/test_server_8_npu.py",
# add new 8-npu test files here
],
}
SUITES.update(suites_ascend)
@@ -201,6 +201,62 @@
"expected_e2e_ms": 38738.17,
"expected_avg_denoise_ms": 523.62,
"expected_median_denoise_ms": 536.23
},
"wan2_2_t2v_14b_w8a8_8npu": {
"stages_ms": {
"InputValidationStage": 0.07,
"TextEncodingStage": 301.21,
"LatentPreparationStage": 0.2,
"TimestepPreparationStage": 2.68,
"DenoisingStage": 83661.46,
"DecodingStage": 232.94,
"per_frame_generation": null
},
"denoise_step_ms": {
"0": 1919.92,
"1": 2099.45,
"2": 2092.11,
"3": 2090.84,
"4": 2089.89,
"5": 2090.6,
"6": 2090.77,
"7": 2091.43,
"8": 2091.24,
"9": 2067.83,
"10": 2078.02,
"11": 2090.75,
"12": 2108.36,
"13": 2096.16,
"14": 2091.74,
"15": 2091.47,
"16": 2091.6,
"17": 2091.94,
"18": 2091.39,
"19": 2090.69,
"20": 2090.27,
"21": 2090.77,
"22": 2090.24,
"23": 2091.65,
"24": 2091.21,
"25": 2126.82,
"26": 2338.39,
"27": 2085.18,
"28": 2084.68,
"29": 2084.71,
"30": 2051.48,
"31": 2104.3,
"32": 2084.58,
"33": 2085.04,
"34": 2085.03,
"35": 2084.58,
"36": 2084.41,
"37": 2085.16,
"38": 2084.88,
"39": 2083.54
},
"expected_e2e_ms": 91733.92,
"expected_avg_denoise_ms": 2091.33,
"expected_median_denoise_ms": 2090.72
}
}
}
@@ -0,0 +1,31 @@
"""
Config-driven diffusion performance test with pytest parametrization.
If the actual run is significantly better than the baseline, the improved cases with their updated baseline will be printed
"""
from __future__ import annotations
import pytest
from sglang.multimodal_gen.runtime.utils.logging_utils import init_logger
from sglang.multimodal_gen.test.server.ascend.testcase_configs_npu import (
EIGHT_NPU_CASES,
)
from sglang.multimodal_gen.test.server.test_server_common import ( # noqa: F401
DiffusionServerBase,
diffusion_server,
)
from sglang.multimodal_gen.test.server.testcase_configs import DiffusionTestCase
logger = init_logger(__name__)
class TestDiffusionServerEightNpu(DiffusionServerBase):
"""Performance tests for 8-NPU diffusion cases."""
@pytest.fixture(params=EIGHT_NPU_CASES, ids=lambda c: c.id)
def case(self, request) -> DiffusionTestCase:
"""Provide a DiffusionTestCase for each 8-NPU test."""
return request.param
@@ -43,3 +43,20 @@ TWO_NPU_CASES: list[DiffusionTestCase] = [
T2I_sampling_params,
),
]
EIGHT_NPU_CASES: list[DiffusionTestCase] = [
# === Text to Video (T2V) ===
DiffusionTestCase(
"wan2_2_t2v_14b_w8a8_8npu",
DiffusionServerArgs(
model_path="/root/.cache/modelscope/hub/models/Eco-Tech/Wan2.2-T2V-A14B-Diffusers-w8a8",
modality="video",
custom_validator="video",
num_gpus=8,
tp_size=4,
),
DiffusionSamplingParams(
prompt=T2V_PROMPT,
),
),
]