| 
16 | 16 | import unittest  | 
17 | 17 | 
 
  | 
18 | 18 | import numpy as np  | 
 | 19 | +import pytest  | 
19 | 20 | 
 
  | 
20 | 21 | from diffusers import KandinskyCombinedPipeline, KandinskyImg2ImgCombinedPipeline, KandinskyInpaintCombinedPipeline  | 
 | 22 | +from diffusers.utils import is_transformers_version  | 
21 | 23 | 
 
  | 
22 | 24 | from ...testing_utils import enable_full_determinism, require_torch_accelerator, torch_device  | 
23 | 25 | from ..test_pipelines_common import PipelineTesterMixin  | 
@@ -73,6 +75,9 @@ def get_dummy_inputs(self, device, seed=0):  | 
73 | 75 |         )  | 
74 | 76 |         return inputs  | 
75 | 77 | 
 
  | 
 | 78 | +    @pytest.mark.xfail(  | 
 | 79 | +        condition=is_transformers_version(">=", "4.56.2"), reason="Latest transformers changes the slices", strict=True  | 
 | 80 | +    )  | 
76 | 81 |     def test_kandinsky(self):  | 
77 | 82 |         device = "cpu"  | 
78 | 83 | 
 
  | 
@@ -181,6 +186,9 @@ def get_dummy_inputs(self, device, seed=0):  | 
181 | 186 |         inputs.pop("negative_image_embeds")  | 
182 | 187 |         return inputs  | 
183 | 188 | 
 
  | 
 | 189 | +    @pytest.mark.xfail(  | 
 | 190 | +        condition=is_transformers_version(">=", "4.56.2"), reason="Latest transformers changes the slices", strict=True  | 
 | 191 | +    )  | 
184 | 192 |     def test_kandinsky(self):  | 
185 | 193 |         device = "cpu"  | 
186 | 194 | 
 
  | 
@@ -292,6 +300,9 @@ def get_dummy_inputs(self, device, seed=0):  | 
292 | 300 |         inputs.pop("negative_image_embeds")  | 
293 | 301 |         return inputs  | 
294 | 302 | 
 
  | 
 | 303 | +    @pytest.mark.xfail(  | 
 | 304 | +        condition=is_transformers_version(">=", "4.56.2"), reason="Latest transformers changes the slices", strict=True  | 
 | 305 | +    )  | 
295 | 306 |     def test_kandinsky(self):  | 
296 | 307 |         device = "cpu"  | 
297 | 308 | 
 
  | 
 | 
0 commit comments