Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions tests/pipelines/test_pipelines.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down
Loading