Skip to content

Commit f65f135

Browse files
authored
[tests] xfail clip related issues. (#13454)
xfail clip related issues./
1 parent 273b445 commit f65f135

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

tests/pipelines/test_pipelines.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,12 @@ def test_download_onnx_by_default_for_onnx_pipelines(self):
368368
assert any((f.endswith(".onnx")) for f in files)
369369
assert any((f.endswith(".pb")) for f in files)
370370

371+
@pytest.mark.xfail(
372+
condition=is_transformers_version(">", "4.56.2"),
373+
reason="CLIPTextModel architecture was flattened in transformers>4.56.2 without backward-compat key mapping. "
374+
"See https://github.com/huggingface/transformers/issues/45390",
375+
strict=False,
376+
)
371377
def test_download_no_safety_checker(self):
372378
prompt = "hello"
373379
pipe = StableDiffusionPipeline.from_pretrained(
@@ -423,6 +429,12 @@ def test_load_no_safety_checker_default_locally(self):
423429

424430
assert np.max(np.abs(out - out_2)) < 1e-3
425431

432+
@pytest.mark.xfail(
433+
condition=is_transformers_version(">", "4.56.2"),
434+
reason="CLIPTextModel architecture was flattened in transformers>4.56.2 without backward-compat key mapping. "
435+
"See https://github.com/huggingface/transformers/issues/45390",
436+
strict=False,
437+
)
426438
def test_cached_files_are_used_when_no_internet(self):
427439
# A mock response for an HTTP head request to emulate server down
428440
response_mock = mock.Mock()
@@ -450,6 +462,12 @@ def test_cached_files_are_used_when_no_internet(self):
450462
if p1.data.ne(p2.data).sum() > 0:
451463
assert False, "Parameters not the same!"
452464

465+
@pytest.mark.xfail(
466+
condition=is_transformers_version(">", "4.56.2"),
467+
reason="CLIPTextModel architecture was flattened in transformers>4.56.2 without backward-compat key mapping. "
468+
"See https://github.com/huggingface/transformers/issues/45390",
469+
strict=False,
470+
)
453471
def test_local_files_only_are_used_when_no_internet(self):
454472
# A mock response for an HTTP head request to emulate server down
455473
response_mock = mock.Mock()

0 commit comments

Comments
 (0)