|
45 | 45 | LMSDiscreteScheduler,
|
46 | 46 | PNDMScheduler,
|
47 | 47 | )
|
| 48 | +from diffusers.utils import is_transformers_version |
48 | 49 | from diffusers.utils.testing_utils import (
|
49 | 50 | backend_empty_cache,
|
50 | 51 | enable_full_determinism,
|
@@ -220,6 +221,11 @@ def get_dummy_inputs(self, device, seed=0):
|
220 | 221 | }
|
221 | 222 | return inputs
|
222 | 223 |
|
| 224 | + @pytest.mark.xfail( |
| 225 | + condition=is_transformers_version(">=", "4.54.1"), |
| 226 | + reason="Test currently fails on Transformers version 4.54.1.", |
| 227 | + strict=False, |
| 228 | + ) |
223 | 229 | def test_audioldm2_ddim(self):
|
224 | 230 | device = "cpu" # ensure determinism for the device-dependent torch.Generator
|
225 | 231 |
|
@@ -312,7 +318,6 @@ def test_audioldm2_negative_prompt_embeds(self):
|
312 | 318 | components = self.get_dummy_components()
|
313 | 319 | audioldm_pipe = AudioLDM2Pipeline(**components)
|
314 | 320 | audioldm_pipe = audioldm_pipe.to(torch_device)
|
315 |
| - audioldm_pipe = audioldm_pipe.to(torch_device) |
316 | 321 | audioldm_pipe.set_progress_bar_config(disable=None)
|
317 | 322 |
|
318 | 323 | inputs = self.get_dummy_inputs(torch_device)
|
@@ -371,6 +376,11 @@ def test_audioldm2_negative_prompt_embeds(self):
|
371 | 376 |
|
372 | 377 | assert np.abs(audio_1 - audio_2).max() < 1e-2
|
373 | 378 |
|
| 379 | + @pytest.mark.xfail( |
| 380 | + condition=is_transformers_version(">=", "4.54.1"), |
| 381 | + reason="Test currently fails on Transformers version 4.54.1.", |
| 382 | + strict=False, |
| 383 | + ) |
374 | 384 | def test_audioldm2_negative_prompt(self):
|
375 | 385 | device = "cpu" # ensure determinism for the device-dependent torch.Generator
|
376 | 386 | components = self.get_dummy_components()
|
|
0 commit comments