From 133915fd73c1f2a34adb7de8f9cd3728b164e0b0 Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Sun, 5 Jul 2026 02:32:30 +0000 Subject: [PATCH] Pin the NVIDIA gate open in the dual-DiT attention test --- studio/backend/tests/test_video_backend.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/studio/backend/tests/test_video_backend.py b/studio/backend/tests/test_video_backend.py index 3cae72bec9..d1ce52ef46 100644 --- a/studio/backend/tests/test_video_backend.py +++ b/studio/backend/tests/test_video_backend.py @@ -694,8 +694,13 @@ def test_wan_a14b_step_cache_applies_to_both_dits(fake_runtime): assert status["transformer_cache"] == "fbcache" -def test_wan_a14b_attention_applies_to_both_dits(fake_runtime): - # An explicit attention backend must be set on both experts. +def test_wan_a14b_attention_applies_to_both_dits(fake_runtime, monkeypatch): + # An explicit attention backend must be set on both experts. The fake runtime is a + # CPU target, where the NVIDIA gate correctly drops explicit kernels; pin the gate + # open so the explicit-set path itself is what this test exercises. + from core.inference import diffusion_attention as attn_mod + + monkeypatch.setattr(attn_mod, "_is_cuda_nvidia", lambda target: True) backend = VideoBackend() backend.load_pipeline( "Wan-AI/Wan2.2-T2V-A14B-Diffusers",