From ed1301c669f583e885a9c7f2250977c52870fba7 Mon Sep 17 00:00:00 2001 From: trtllm-agent <296075020+trtllm-agent@users.noreply.github.com> Date: Mon, 3 Aug 2026 05:10:55 -0700 Subject: [PATCH] [nvbugs/6550126][fix] Use renamed negative_prompt_cfg_scale in QwenImage LPIPS tests PR #16384 (Qwen Image CFG parallelism) renamed QwenImagePipeline.forward()'s CFG knob from true_cfg_scale to negative_prompt_cfg_scale and updated the unit tests, but not the integration LPIPS call site, so both QwenImage LPIPS tests raised TypeError. Numerics are unchanged: with an empty negative prompt and scale 4.0 the old do_true_cfg and new use_negative_prompt_cfg are both true, and the guidance math was extracted verbatim into _combine_negative_prompt_cfg. Both tests score 0.009006 against the existing golden. Also drops the two now-obsolete waives.txt entries for this bug. Signed-off-by: trtllm-agent <296075020+trtllm-agent@users.noreply.github.com> --- .../defs/examples/visual_gen/test_visual_gen.py | 8 ++++---- tests/integration/test_lists/waives.txt | 2 -- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/tests/integration/defs/examples/visual_gen/test_visual_gen.py b/tests/integration/defs/examples/visual_gen/test_visual_gen.py index e997b5643fb5..3458ad6a005f 100644 --- a/tests/integration/defs/examples/visual_gen/test_visual_gen.py +++ b/tests/integration/defs/examples/visual_gen/test_visual_gen.py @@ -96,8 +96,8 @@ # QwenImage (text-to-image) — default-setting LPIPS golden. # Params mirror the QwenImage 20B reference defaults (pipeline_qwen_image.py). -# NOTE: QwenImage's forward CFG knob is ``true_cfg_scale`` (not ``guidance_scale``), -# and real-CFG only engages when a negative prompt is supplied. +# NOTE: QwenImage's forward CFG knob is ``negative_prompt_cfg_scale`` (not +# ``guidance_scale``), and negative-prompt CFG only engages when it is > 1.0. QWENIMAGE_MODEL_SUBPATH = "qwen-image" QWEN_IMAGE_EDIT_MODEL_SUBPATH = "Qwen-Image-Edit-2511" QWENIMAGE_LPIPS_PROMPT = "a tiny astronaut hatching from an egg on the moon" @@ -105,7 +105,7 @@ QWENIMAGE_LPIPS_HEIGHT = 1328 QWENIMAGE_LPIPS_WIDTH = 1328 QWENIMAGE_LPIPS_NUM_INFERENCE_STEPS = 50 -QWENIMAGE_LPIPS_TRUE_CFG_SCALE = 4.0 +QWENIMAGE_LPIPS_NEGATIVE_PROMPT_CFG_SCALE = 4.0 QWENIMAGE_LPIPS_SEED = 42 QWENIMAGE_LPIPS_THRESHOLD = 0.05 QWEN_IMAGE_LAYERED_LPIPS_PROMPT = "" @@ -890,7 +890,7 @@ def _generate_qwenimage_lpips_image(model_path, output_path, *, enable_cuda_grap height=QWENIMAGE_LPIPS_HEIGHT, width=QWENIMAGE_LPIPS_WIDTH, num_inference_steps=QWENIMAGE_LPIPS_NUM_INFERENCE_STEPS, - true_cfg_scale=QWENIMAGE_LPIPS_TRUE_CFG_SCALE, + negative_prompt_cfg_scale=QWENIMAGE_LPIPS_NEGATIVE_PROMPT_CFG_SCALE, seed=QWENIMAGE_LPIPS_SEED, ) generated_image = result.image[0].detach().cpu() diff --git a/tests/integration/test_lists/waives.txt b/tests/integration/test_lists/waives.txt index acc7b260a7cb..e71f853aea43 100644 --- a/tests/integration/test_lists/waives.txt +++ b/tests/integration/test_lists/waives.txt @@ -137,8 +137,6 @@ examples/test_ray.py::test_ray_disaggregated_serving[tp2] SKIP (https://nvbugs/5 examples/visual_gen/test_visual_gen.py::test_cosmos3_nano_t2i_lpips_against_golden SKIP (https://nvbugs/6418815) examples/visual_gen/test_visual_gen.py::test_cosmos3_nano_t2v_lpips_against_golden SKIP (https://nvbugs/6437341) examples/visual_gen/test_visual_gen.py::test_ltx2_cuda_graph_trtllm_backend SKIP (https://nvbugs/6463822) -examples/visual_gen/test_visual_gen.py::test_qwenimage_cuda_graph_lpips_against_golden SKIP (https://nvbugs/6550126) -examples/visual_gen/test_visual_gen.py::test_qwenimage_lpips_against_golden SKIP (https://nvbugs/6550126) examples/visual_gen/test_visual_gen.py::test_wan22_t2v_lpips_against_golden SKIP (https://nvbugs/6535765) examples/visual_gen/test_visual_gen_multi_gpu.py::test_wan22_t2v_lpips_against_golden_multi_gpu[cfg2_ulysses2] SKIP (https://nvbugs/6535765) examples/visual_gen/test_visual_gen_multi_gpu.py::test_wan22_t2v_lpips_against_golden_multi_gpu[ulysses4] SKIP (https://nvbugs/6535765)