Skip to content

Commit

Permalink
Skip test_freeu_enabled on MPS (huggingface#7570)
Browse files Browse the repository at this point in the history
* Skip `test_freeu_enabled ` on MPS

* Small fixes

- import skip_mps correctly
- disable all instances of test_freeu_enabled

* Empty commit to trigger tests

* Empty commit to trigger CI
  • Loading branch information
UmerHA authored Apr 4, 2024
1 parent 35db2fd commit 71f49a5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions tests/pipelines/stable_diffusion/test_stable_diffusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
require_torch_2,
require_torch_gpu,
run_test_in_subprocess,
skip_mps,
slow,
torch_device,
)
Expand Down Expand Up @@ -639,6 +640,8 @@ def test_attention_slicing_forward_pass(self):
def test_inference_batch_single_identical(self):
super().test_inference_batch_single_identical(expected_max_diff=3e-3)

# MPS currently doesn't support ComplexFloats, which are required for freeU - see https://github.com/huggingface/diffusers/issues/7569.
@skip_mps
def test_freeu_enabled(self):
components = self.get_dummy_components()
sd_pipe = StableDiffusionPipeline(**components)
Expand Down
4 changes: 3 additions & 1 deletion tests/pipelines/test_pipelines_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
from diffusers.schedulers import KarrasDiffusionSchedulers
from diffusers.utils import logging
from diffusers.utils.import_utils import is_accelerate_available, is_accelerate_version, is_xformers_available
from diffusers.utils.testing_utils import CaptureLogger, require_torch, torch_device
from diffusers.utils.testing_utils import CaptureLogger, require_torch, skip_mps, torch_device

from ..models.autoencoders.test_models_vae import (
get_asym_autoencoder_kl_config,
Expand Down Expand Up @@ -125,6 +125,8 @@ def test_vae_tiling(self):
zeros = torch.zeros(shape).to(torch_device)
pipe.vae.decode(zeros)

# MPS currently doesn't support ComplexFloats, which are required for freeU - see https://github.com/huggingface/diffusers/issues/7569.
@skip_mps
def test_freeu_enabled(self):
components = self.get_dummy_components()
pipe = self.pipeline_class(**components)
Expand Down

0 comments on commit 71f49a5

Please sign in to comment.