From 7e3353196cc5cc582b212691fbc05a6c86ed8a98 Mon Sep 17 00:00:00 2001 From: Anwesha Chowdhury <133762127+AChowdhury1211@users.noreply.github.com> Date: Tue, 13 May 2025 23:35:52 +0530 Subject: [PATCH] Fix deprecation warnings in test_ltx_image2video.py (#11538) Fixed 2 warnings that were raised during running LTXImageToVideoPipelineFastTests Co-authored-by: achowdhury1211@gmail.com --- tests/pipelines/ltx/test_ltx_image2video.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/pipelines/ltx/test_ltx_image2video.py b/tests/pipelines/ltx/test_ltx_image2video.py index 1c3e018a8a..6c425a2e3f 100644 --- a/tests/pipelines/ltx/test_ltx_image2video.py +++ b/tests/pipelines/ltx/test_ltx_image2video.py @@ -109,7 +109,7 @@ class LTXImageToVideoPipelineFastTests(PipelineTesterMixin, unittest.TestCase): else: generator = torch.Generator(device=device).manual_seed(seed) - image = torch.randn((1, 3, 32, 32), generator=generator, device=device) + image = torch.rand((1, 3, 32, 32), generator=generator, device=device) inputs = { "image": image, @@ -142,7 +142,7 @@ class LTXImageToVideoPipelineFastTests(PipelineTesterMixin, unittest.TestCase): self.assertEqual(generated_video.shape, (9, 3, 32, 32)) expected_video = torch.randn(9, 3, 32, 32) - max_diff = np.abs(generated_video - expected_video).max() + max_diff = torch.amax(torch.abs(generated_video - expected_video)) self.assertLessEqual(max_diff, 1e10) def test_callback_inputs(self):