Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 0 additions & 34 deletions tests/pipelines/pixart/test_pixart.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,40 +329,6 @@ def tearDown(self):
gc.collect()
torch.cuda.empty_cache()

def test_pixart_1024_fast(self):
generator = torch.manual_seed(0)

pipe = PixArtAlphaPipeline.from_pretrained(self.ckpt_id_1024, torch_dtype=torch.float16)
pipe.enable_model_cpu_offload()

prompt = self.prompt

image = pipe(prompt, generator=generator, num_inference_steps=2, output_type="np").images

image_slice = image[0, -3:, -3:, -1]

expected_slice = np.array([0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0])

max_diff = np.abs(image_slice.flatten() - expected_slice).max()
self.assertLessEqual(max_diff, 1e-3)

def test_pixart_512_fast(self):
generator = torch.manual_seed(0)

pipe = PixArtAlphaPipeline.from_pretrained(self.ckpt_id_512, torch_dtype=torch.float16)
pipe.enable_model_cpu_offload()

prompt = self.prompt

image = pipe(prompt, generator=generator, num_inference_steps=2, output_type="np").images

image_slice = image[0, -3:, -3:, -1]

expected_slice = np.array([0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0])

max_diff = np.abs(image_slice.flatten() - expected_slice).max()
self.assertLessEqual(max_diff, 1e-3)

def test_pixart_1024(self):
generator = torch.manual_seed(0)

Expand Down