@@ -436,6 +436,9 @@ def test_unidiffuser_img2text_multiple_prompts_with_latents(self):
436
436
437
437
assert len (text ) == 3
438
438
439
+ def test_inference_batch_single_identical (self ):
440
+ super ().test_inference_batch_single_identical (expected_max_diff = 2e-4 )
441
+
439
442
@require_torch_gpu
440
443
def test_unidiffuser_default_joint_v1_cuda_fp16 (self ):
441
444
device = "cuda"
@@ -583,7 +586,7 @@ def test_unidiffuser_default_joint_v1(self):
583
586
expected_img_slice = np .array ([0.2402 , 0.2375 , 0.2285 , 0.2378 , 0.2407 , 0.2263 , 0.2354 , 0.2307 , 0.2520 ])
584
587
assert np .abs (image_slice .flatten () - expected_img_slice ).max () < 1e-1
585
588
586
- expected_text_prefix = "A living room"
589
+ expected_text_prefix = "a living room"
587
590
assert text [0 ][: len (expected_text_prefix )] == expected_text_prefix
588
591
589
592
def test_unidiffuser_default_text2img_v1 (self ):
@@ -634,9 +637,9 @@ def test_unidiffuser_default_joint_v1_fp16(self):
634
637
635
638
image_slice = image [0 , - 3 :, - 3 :, - 1 ]
636
639
expected_img_slice = np .array ([0.2402 , 0.2375 , 0.2285 , 0.2378 , 0.2407 , 0.2263 , 0.2354 , 0.2307 , 0.2520 ])
637
- assert np .abs (image_slice .flatten () - expected_img_slice ).max () < 1e -1
640
+ assert np .abs (image_slice .flatten () - expected_img_slice ).max () < 2e -1
638
641
639
- expected_text_prefix = "A living room"
642
+ expected_text_prefix = "a living room"
640
643
assert text [0 ][: len (expected_text_prefix )] == expected_text_prefix
641
644
642
645
def test_unidiffuser_default_text2img_v1_fp16 (self ):
0 commit comments