Skip to content

Commit 7536f64

Browse files
Loose the criteria tolerance appropriately for Intel XPU devices (#12460)
* Loose the criteria tolerance appropriately for Intel XPU devices Signed-off-by: Liu, Kaixuan <[email protected]> * change back the atol value Signed-off-by: Liu, Kaixuan <[email protected]> * use expectations Signed-off-by: Liu, Kaixuan <[email protected]> * Update tests/pipelines/kandinsky2_2/test_kandinsky_controlnet.py --------- Signed-off-by: Liu, Kaixuan <[email protected]> Co-authored-by: Ilyas Moutawwakil <[email protected]>
1 parent a138d71 commit 7536f64

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

tests/pipelines/kandinsky2_2/test_kandinsky_controlnet.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
)
3030

3131
from ...testing_utils import (
32+
Expectations,
3233
backend_empty_cache,
3334
enable_full_determinism,
3435
floats_tensor,
@@ -290,4 +291,11 @@ def test_kandinsky_controlnet(self):
290291

291292
assert image.shape == (512, 512, 3)
292293
max_diff = numpy_cosine_similarity_distance(expected_image.flatten(), image.flatten())
293-
assert max_diff < 2e-4
294+
expected_max_diffs = Expectations(
295+
{
296+
("xpu", 3): 2e-3,
297+
("cuda", 7): 2e-4,
298+
}
299+
)
300+
expected_max_diff = expected_max_diffs.get_expectation()
301+
assert max_diff < expected_max_diff

0 commit comments

Comments
 (0)