Skip to content

Invoke is a leading creative engine that uses image and video generation models to empower professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry-leading application interface, and serves as the foundation for multiple commercial products.

test(ltx2): pin the keyframe reservation test to the CPU

Lincoln Steince38db7f55df
diff --git a/tests/app/invocations/test_ltx2_nodes.py b/tests/app/invocations/test_ltx2_nodes.py
index 76aa2e2eae..65eeedf4de 100644
--- a/tests/app/invocations/test_ltx2_nodes.py
+++ b/tests/app/invocations/test_ltx2_nodes.py
@@ -1356,6 +1356,10 @@ def test_the_reservation_covers_the_keyframe_rows_the_transformer_attends_over(m
import invokeai.app.invocations.ltx2.ltx2_denoise as denoise_module
captured: list[int] = []
+ # The reservation is arithmetic over the sequence, not a hardware question, but `invoke` asks the
+ # chosen device for its dtype before it gets there. Left unpinned that reaches the real
+ # accelerator: on a macOS runner MPS reports available and then fails every allocation.
+ monkeypatch.setattr(TorchDevice, "choose_torch_device", staticmethod(lambda: torch.device("cpu")))
node = _denoise(num_frames=121, keyframe_conditioning=_keyframe_field(-1), cfg_scale=1.0, audio_cfg_scale=1.0)
monkeypatch.setattr(
type(node),