Skip to content

Commit 3351270

Browse files
authored
[PixArt Tests] remove fast tests from slow suite (#5945)
remove fast tests from slow suite
1 parent 4520e12 commit 3351270

File tree

1 file changed

+0
-34
lines changed

1 file changed

+0
-34
lines changed

tests/pipelines/pixart/test_pixart.py

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -329,40 +329,6 @@ def tearDown(self):
329329
gc.collect()
330330
torch.cuda.empty_cache()
331331

332-
def test_pixart_1024_fast(self):
333-
generator = torch.manual_seed(0)
334-
335-
pipe = PixArtAlphaPipeline.from_pretrained(self.ckpt_id_1024, torch_dtype=torch.float16)
336-
pipe.enable_model_cpu_offload()
337-
338-
prompt = self.prompt
339-
340-
image = pipe(prompt, generator=generator, num_inference_steps=2, output_type="np").images
341-
342-
image_slice = image[0, -3:, -3:, -1]
343-
344-
expected_slice = np.array([0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0])
345-
346-
max_diff = np.abs(image_slice.flatten() - expected_slice).max()
347-
self.assertLessEqual(max_diff, 1e-3)
348-
349-
def test_pixart_512_fast(self):
350-
generator = torch.manual_seed(0)
351-
352-
pipe = PixArtAlphaPipeline.from_pretrained(self.ckpt_id_512, torch_dtype=torch.float16)
353-
pipe.enable_model_cpu_offload()
354-
355-
prompt = self.prompt
356-
357-
image = pipe(prompt, generator=generator, num_inference_steps=2, output_type="np").images
358-
359-
image_slice = image[0, -3:, -3:, -1]
360-
361-
expected_slice = np.array([0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0])
362-
363-
max_diff = np.abs(image_slice.flatten() - expected_slice).max()
364-
self.assertLessEqual(max_diff, 1e-3)
365-
366332
def test_pixart_1024(self):
367333
generator = torch.manual_seed(0)
368334

0 commit comments

Comments
 (0)