diff --git a/tests/lora/test_lora_layers_peft.py b/tests/lora/test_lora_layers_peft.py index f6cd2a714ae2..d60817367648 100644 --- a/tests/lora/test_lora_layers_peft.py +++ b/tests/lora/test_lora_layers_peft.py @@ -1877,7 +1877,9 @@ def test_sdxl_1_0_lora_unfusion(self): ).images images_without_fusion = images.flatten() - self.assertTrue(np.allclose(images_with_fusion, images_without_fusion, atol=1e-3)) + max_diff = numpy_cosine_similarity_distance(images_with_fusion, images_without_fusion) + assert max_diff < 1e-4 + release_memory(pipe) def test_sdxl_1_0_lora_unfusion_effectivity(self):