From 8e37453256dc33db7f8f997d2e978f6aadf43cab Mon Sep 17 00:00:00 2001 From: sayakpaul Date: Mon, 13 Apr 2026 10:35:05 +0530 Subject: [PATCH] xfail clip related issues./ --- tests/pipelines/test_pipelines.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/pipelines/test_pipelines.py b/tests/pipelines/test_pipelines.py index a17db3ff0c5a..81c90bc56477 100644 --- a/tests/pipelines/test_pipelines.py +++ b/tests/pipelines/test_pipelines.py @@ -368,6 +368,12 @@ def test_download_onnx_by_default_for_onnx_pipelines(self): assert any((f.endswith(".onnx")) for f in files) assert any((f.endswith(".pb")) for f in files) + @pytest.mark.xfail( + condition=is_transformers_version(">", "4.56.2"), + reason="CLIPTextModel architecture was flattened in transformers>4.56.2 without backward-compat key mapping. " + "See https://github.com/huggingface/transformers/issues/45390", + strict=False, + ) def test_download_no_safety_checker(self): prompt = "hello" pipe = StableDiffusionPipeline.from_pretrained( @@ -423,6 +429,12 @@ def test_load_no_safety_checker_default_locally(self): assert np.max(np.abs(out - out_2)) < 1e-3 + @pytest.mark.xfail( + condition=is_transformers_version(">", "4.56.2"), + reason="CLIPTextModel architecture was flattened in transformers>4.56.2 without backward-compat key mapping. " + "See https://github.com/huggingface/transformers/issues/45390", + strict=False, + ) def test_cached_files_are_used_when_no_internet(self): # A mock response for an HTTP head request to emulate server down response_mock = mock.Mock() @@ -450,6 +462,12 @@ def test_cached_files_are_used_when_no_internet(self): if p1.data.ne(p2.data).sum() > 0: assert False, "Parameters not the same!" + @pytest.mark.xfail( + condition=is_transformers_version(">", "4.56.2"), + reason="CLIPTextModel architecture was flattened in transformers>4.56.2 without backward-compat key mapping. " + "See https://github.com/huggingface/transformers/issues/45390", + strict=False, + ) def test_local_files_only_are_used_when_no_internet(self): # A mock response for an HTTP head request to emulate server down response_mock = mock.Mock()