@@ -329,40 +329,6 @@ def tearDown(self):
329
329
gc .collect ()
330
330
torch .cuda .empty_cache ()
331
331
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
-
366
332
def test_pixart_1024 (self ):
367
333
generator = torch .manual_seed (0 )
368
334
0 commit comments