[CI][Bugfix] Align the LTX-2 FP8 quality gate with the default recipe (#5831)

Signed-off-by: mglyn <1203789601@qq.com>
This commit is contained in:
Mu GuanLin authored and GitHub committed 2026-08-29 02:24:09 +00:00
1 parent f584729f24
commit 55a8bd6b80
1 file changed
+59 -24
@@ -81,7 +81,7 @@ class QualityTestConfig:
num_frames: int = 5 # only for t2v
seed: int = 42
gpu: str = "H100" # minimum GPU requirement
negative_prompt: str = ""
negative_prompt: str | None = ""
guidance_scale: float | None = None
sigmas: list[float] | None = None
enable_cpu_offload: bool = False
@@ -212,24 +212,14 @@ QUALITY_CONFIGS = [
quantization="fp8",
task="t2v",
prompt="A serene lakeside sunrise with mist over the water",
max_lpips=0.10,
height=256,
width=256,
num_frames=25,
num_inference_steps=8,
# Preserve the final scheduler trajectory used when this FP8 quality
# gate was established. Explicit LTX sigmas bypass dynamic shifting.
sigmas=[
1.0,
0.92185378074646,
0.8327768445014954,
0.7303033471107483,
0.6111654043197632,
0.4709382653236389,
0.30347853899002075,
0.10000002384185791,
0.0,
],
max_lpips=0.20,
height=384,
width=512,
num_frames=73,
num_inference_steps=10,
# Do not override the recipe's negative conditioning, guidance, or
# scheduler trajectory: this gate follows the supported LTX default.
negative_prompt=None,
),
]
@@ -296,8 +286,11 @@ def _generate_image(omni, config: QualityTestConfig):
).manual_seed(config.seed)
torch.accelerator.reset_peak_memory_stats()
prompt = {"prompt": config.prompt}
if config.negative_prompt is not None:
prompt["negative_prompt"] = config.negative_prompt
outputs = omni.generate(
{"prompt": config.prompt, "negative_prompt": config.negative_prompt},
prompt,
OmniDiffusionSamplingParams(
height=config.height,
width=config.width,
@@ -328,8 +321,11 @@ def _generate_video(omni, config: QualityTestConfig):
).manual_seed(config.seed)
torch.accelerator.reset_peak_memory_stats()
prompt = {"prompt": config.prompt}
if config.negative_prompt is not None:
prompt["negative_prompt"] = config.negative_prompt
outputs = omni.generate(
{"prompt": config.prompt, "negative_prompt": config.negative_prompt},
prompt,
OmniDiffusionSamplingParams(
height=config.height,
width=config.width,
@@ -465,6 +461,7 @@ def test_benchmark_generate_image_unwraps_nested_omni_request_output(monkeypatch
def test_generate_video_forwards_sigmas(monkeypatch):
from vllm_omni.outputs import OmniRequestOutput
from vllm_omni.platforms import current_omni_platform
monkeypatch.setattr(current_omni_platform, "device_type", "cpu", raising=False)
@@ -475,7 +472,12 @@ def test_generate_video_forwards_sigmas(monkeypatch):
class DummyOmni:
def generate(self, _prompt, sampling):
captured.sampling = sampling
return [SimpleNamespace(images=[np.zeros((1, 2, 2, 3), dtype=np.float32)])]
return [
OmniRequestOutput.from_diffusion(
request_id="req",
images=[np.zeros((1, 2, 2, 3), dtype=np.float32)],
)
]
config = QualityTestConfig(
id="ltx-sigmas",
@@ -491,6 +493,41 @@ def test_generate_video_forwards_sigmas(monkeypatch):
assert captured.sampling.sigmas == [1.0, 0.5]
@pytest.mark.core_model
@pytest.mark.cpu
def test_ltx_quality_gate_uses_official_eager_defaults(monkeypatch):
from vllm_omni.outputs import OmniRequestOutput
from vllm_omni.platforms import current_omni_platform
monkeypatch.setattr(current_omni_platform, "device_type", "cpu", raising=False)
monkeypatch.setattr(torch.accelerator, "reset_peak_memory_stats", lambda: None, raising=False)
monkeypatch.setattr(torch.accelerator, "max_memory_allocated", lambda: 0, raising=False)
captured = SimpleNamespace(prompt=None, sampling=None)
class DummyOmni:
def generate(self, prompt, sampling):
captured.prompt = prompt
captured.sampling = sampling
return [
OmniRequestOutput.from_diffusion(
request_id="req",
images=[np.zeros((1, 2, 2, 3), dtype=np.float32)],
)
]
config = next(config for config in QUALITY_CONFIGS if config.id == "fp8_ltx2")
_generate_video(DummyOmni(), config)
assert (config.width, config.height, config.num_frames, config.num_inference_steps) == (512, 384, 73, 10)
assert config.max_lpips == 0.20
assert config.sigmas is None
assert config.guidance_scale is None
assert config.negative_prompt is None
assert "negative_prompt" not in captured.prompt
assert captured.sampling.sigmas is None
assert captured.sampling.guidance_scale is None
_marks = hardware_marks(res={"cuda": "H100"})
_OUTPUT_DIR = Path(os.environ["VLLM_OMNI_QUALITY_OUTPUT_DIR"]) if "VLLM_OMNI_QUALITY_OUTPUT_DIR" in os.environ else None
@@ -501,8 +538,6 @@ def _quality_param(c: QualityTestConfig):
marks.append(
pytest.mark.skip(reason="Qwen-Image FP8 quality gate temporarily disabled (see CI / issue tracker).")
)
if c.id == "fp8_ltx2":
marks.append(pytest.mark.skip(reason="https://github.com/vllm-project/vllm-omni/issues/6245"))
return pytest.param(c, id=c.id, marks=marks)