diff --git a/tests/pipelines/kandinsky2_2/test_kandinsky_controlnet.py b/tests/pipelines/kandinsky2_2/test_kandinsky_controlnet.py index 4054e38c5691..8f8e58a8c4c8 100644 --- a/tests/pipelines/kandinsky2_2/test_kandinsky_controlnet.py +++ b/tests/pipelines/kandinsky2_2/test_kandinsky_controlnet.py @@ -29,6 +29,7 @@ ) from ...testing_utils import ( + Expectations, backend_empty_cache, enable_full_determinism, floats_tensor, @@ -290,4 +291,11 @@ def test_kandinsky_controlnet(self): assert image.shape == (512, 512, 3) max_diff = numpy_cosine_similarity_distance(expected_image.flatten(), image.flatten()) - assert max_diff < 2e-4 + expected_max_diffs = Expectations( + { + ("xpu", 3): 2e-3, + ("cuda", 7): 2e-4, + } + ) + expected_max_diff = expected_max_diffs.get_expectation() + assert max_diff < expected_max_diff