[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot] 2026-07-09 09:25:49 +00:00
commit 65d33c85bb
2 changed files with 9 additions and 3 deletions

View file

@ -265,9 +265,13 @@ def test_quantize_explicit_torchao_probes_kernel(monkeypatch):
# encoder yet the kernel is broken, report dense (None) instead of crashing on the first forward.
_stub_torch(monkeypatch, cc = (10, 0))
monkeypatch.setattr(dp, "_te_scheme_probe", lambda scheme, device: False)
monkeypatch.setattr(dp, "_cast_fp8_dynamic", lambda *a: pytest.fail("must not cast on probe fail"))
monkeypatch.setattr(
dp, "_cast_fp8_dynamic", lambda *a: pytest.fail("must not cast on probe fail")
)
monkeypatch.setattr(dp, "_cast_nvfp4", lambda *a: pytest.fail("must not cast on probe fail"))
monkeypatch.setattr(dp, "_cast_int8_selective", lambda *a: pytest.fail("must not cast on probe fail"))
monkeypatch.setattr(
dp, "_cast_int8_selective", lambda *a: pytest.fail("must not cast on probe fail")
)
pipe = types.SimpleNamespace(text_encoder = object())
assert quantize_text_encoders(pipe, _target(), mode = "fp8_dynamic") is None
assert quantize_text_encoders(pipe, _target(), mode = "nvfp4") is None

View file

@ -1138,7 +1138,9 @@ def test_video_speed_off_suppresses_auto_companion_quant(fake_runtime, monkeypat
te_modes: list = []
vae_modes: list = []
monkeypatch.setattr(
video_mod, "quantize_text_encoders", lambda pipe, target, *, mode, **kw: te_modes.append(mode)
video_mod,
"quantize_text_encoders",
lambda pipe, target, *, mode, **kw: te_modes.append(mode),
)
monkeypatch.setattr(
video_mod, "quantize_vae", lambda pipe, target, *, mode, **kw: vae_modes.append(mode)