Skip to content

Commit 9ae5b62

Browse files
authored
[ci] xfail failing tests in CI. (#12418)
xfail failing tests in CI.
1 parent 814d710 commit 9ae5b62

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

tests/pipelines/test_pipelines.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828

2929
import numpy as np
3030
import PIL.Image
31+
import pytest
3132
import requests_mock
3233
import safetensors.torch
3334
import torch
@@ -62,10 +63,7 @@
6263
)
6364
from diffusers.pipelines.pipeline_utils import _get_pipeline_class
6465
from diffusers.schedulers.scheduling_utils import SCHEDULER_CONFIG_NAME
65-
from diffusers.utils import (
66-
CONFIG_NAME,
67-
WEIGHTS_NAME,
68-
)
66+
from diffusers.utils import CONFIG_NAME, WEIGHTS_NAME, is_transformers_version
6967
from diffusers.utils.torch_utils import is_compiled_module
7068

7169
from ..testing_utils import (
@@ -584,6 +582,7 @@ def test_download_variants_with_sharded_checkpoints(self):
584582
assert not any(f.endswith(unexpected_ext) for f in files)
585583
assert all(variant in f for f in model_files if f.endswith(model_ext) and variant is not None)
586584

585+
@pytest.mark.xfail(condition=is_transformers_version(">", "4.56.2"), reason="Some import error", strict=True)
587586
def test_download_legacy_variants_with_sharded_ckpts_raises_warning(self):
588587
repo_id = "hf-internal-testing/tiny-stable-diffusion-pipe-variants-all-kinds"
589588
logger = logging.get_logger("diffusers.pipelines.pipeline_utils")
@@ -690,6 +689,7 @@ def test_download_bin_variant_does_not_exist_for_model(self):
690689
)
691690
assert "Error no file name" in str(error_context.exception)
692691

692+
@pytest.mark.xfail(condition=is_transformers_version(">", "4.56.2"), reason="Some import error", strict=True)
693693
def test_local_save_load_index(self):
694694
prompt = "hello"
695695
for variant in [None, "fp16"]:
@@ -1584,6 +1584,7 @@ def test_save_safe_serialization(self):
15841584
assert pipeline.scheduler is not None
15851585
assert pipeline.feature_extractor is not None
15861586

1587+
@pytest.mark.xfail(condition=is_transformers_version(">", "4.56.2"), reason="Some import error", strict=True)
15871588
def test_no_pytorch_download_when_doing_safetensors(self):
15881589
# by default we don't download
15891590
with tempfile.TemporaryDirectory() as tmpdirname:
@@ -1603,6 +1604,7 @@ def test_no_pytorch_download_when_doing_safetensors(self):
16031604
# pytorch does not
16041605
assert not os.path.exists(os.path.join(path, "diffusion_pytorch_model.bin"))
16051606

1607+
@pytest.mark.xfail(condition=is_transformers_version(">", "4.56.2"), reason="Some import error", strict=True)
16061608
def test_no_safetensors_download_when_doing_pytorch(self):
16071609
use_safetensors = False
16081610

0 commit comments

Comments
 (0)