Skip to content

Commit 439d039

Browse files
committed
up
1 parent 8a0d1fa commit 439d039

1 file changed

Lines changed: 2 additions & 11 deletions

File tree

tests/pipelines/test_pipelines.py

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

2929
import numpy as np
3030
import PIL.Image
31-
import pytest
3231
import requests_mock
3332
import safetensors.torch
3433
import torch
@@ -63,7 +62,7 @@
6362
)
6463
from diffusers.pipelines.pipeline_utils import _get_pipeline_class
6564
from diffusers.schedulers.scheduling_utils import SCHEDULER_CONFIG_NAME
66-
from diffusers.utils import CONFIG_NAME, WEIGHTS_NAME, is_transformers_version
65+
from diffusers.utils import CONFIG_NAME, WEIGHTS_NAME
6766
from diffusers.utils.torch_utils import is_compiled_module
6867

6968
from ..testing_utils import (
@@ -582,7 +581,6 @@ def test_download_variants_with_sharded_checkpoints(self):
582581
assert not any(f.endswith(unexpected_ext) for f in files)
583582
assert all(variant in f for f in model_files if f.endswith(model_ext) and variant is not None)
584583

585-
@pytest.mark.xfail(condition=is_transformers_version(">", "4.56.2"), reason="Some import error", strict=True)
586584
def test_download_legacy_variants_with_sharded_ckpts_raises_warning(self):
587585
repo_id = "hf-internal-testing/tiny-stable-diffusion-pipe-variants-all-kinds"
588586
logger = logging.get_logger("diffusers.pipelines.pipeline_utils")
@@ -600,7 +598,6 @@ def test_download_legacy_variants_with_sharded_ckpts_raises_warning(self):
600598
)
601599
assert deprecated_warning_msg in str(cap_logger), "Deprecation warning not found in logs"
602600

603-
@pytest.mark.xfail(condition=is_transformers_version(">", "4.56.2"), reason="Some import error", strict=True)
604601
def test_download_safetensors_only_variant_exists_for_model(self):
605602
variant = None
606603
use_safetensors = True
@@ -630,7 +627,7 @@ def test_download_safetensors_only_variant_exists_for_model(self):
630627
# https://huggingface.co/hf-internal-testing/stable-diffusion-broken-variants/tree/main/unet
631628
assert len(files) == 15, f"We should only download 15 files, not {len(files)}"
632629

633-
@pytest.mark.xfail(condition=is_transformers_version(">", "4.56.2"), reason="Some import error", strict=True)
630+
#
634631
def test_download_bin_only_variant_exists_for_model(self):
635632
variant = None
636633
use_safetensors = False
@@ -660,7 +657,6 @@ def test_download_bin_only_variant_exists_for_model(self):
660657
# https://huggingface.co/hf-internal-testing/stable-diffusion-broken-variants/tree/main/unet
661658
assert len(files) == 15, f"We should only download 15 files, not {len(files)}"
662659

663-
@pytest.mark.xfail(condition=is_transformers_version(">", "4.56.2"), reason="Some import error", strict=True)
664660
def test_download_safetensors_variant_does_not_exist_for_model(self):
665661
variant = "no_ema"
666662
use_safetensors = True
@@ -677,7 +673,6 @@ def test_download_safetensors_variant_does_not_exist_for_model(self):
677673

678674
assert "Could not find the necessary `safetensors` weights" in str(error_context.exception)
679675

680-
@pytest.mark.xfail(condition=is_transformers_version(">", "4.56.2"), reason="Some import error", strict=True)
681676
def test_download_bin_variant_does_not_exist_for_model(self):
682677
variant = "no_ema"
683678
use_safetensors = False
@@ -693,7 +688,6 @@ def test_download_bin_variant_does_not_exist_for_model(self):
693688
)
694689
assert "Error no file name" in str(error_context.exception)
695690

696-
@pytest.mark.xfail(condition=is_transformers_version(">", "4.56.2"), reason="Some import error", strict=True)
697691
def test_local_save_load_index(self):
698692
prompt = "hello"
699693
for variant in [None, "fp16"]:
@@ -1588,7 +1582,6 @@ def test_save_safe_serialization(self):
15881582
assert pipeline.scheduler is not None
15891583
assert pipeline.feature_extractor is not None
15901584

1591-
@pytest.mark.xfail(condition=is_transformers_version(">", "4.56.2"), reason="Some import error", strict=True)
15921585
def test_no_pytorch_download_when_doing_safetensors(self):
15931586
# by default we don't download
15941587
with tempfile.TemporaryDirectory() as tmpdirname:
@@ -1608,7 +1601,6 @@ def test_no_pytorch_download_when_doing_safetensors(self):
16081601
# pytorch does not
16091602
assert not os.path.exists(os.path.join(path, "diffusion_pytorch_model.bin"))
16101603

1611-
@pytest.mark.xfail(condition=is_transformers_version(">", "4.56.2"), reason="Some import error", strict=True)
16121604
def test_no_safetensors_download_when_doing_pytorch(self):
16131605
use_safetensors = False
16141606

@@ -1894,7 +1886,6 @@ def test_dduf_raises_error_with_connected_pipeline(self):
18941886
"DDUF/tiny-flux-dev-pipe-dduf", dduf_file="fluxpipeline.dduf", load_connected_pipeline=True
18951887
)
18961888

1897-
@pytest.mark.xfail(condition=is_transformers_version(">", "4.56.2"), reason="Some import error", strict=True)
18981889
def test_wrong_model(self):
18991890
tokenizer = CLIPTokenizer.from_pretrained("hf-internal-testing/tiny-random-clip")
19001891
with self.assertRaises(ValueError) as error_context:

0 commit comments

Comments
 (0)