mirror of
https://github.com/huggingface/diffusers.git
synced 2025-12-21 03:44:49 +08:00
Compare commits
3 Commits
custom-blo
...
xfail-fail
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8902bba118 | ||
|
|
d59ecfcf85 | ||
|
|
305cd2f909 |
@@ -18,6 +18,7 @@ import gc
|
|||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
import pytest
|
||||||
import torch
|
import torch
|
||||||
from transformers import (
|
from transformers import (
|
||||||
ClapAudioConfig,
|
ClapAudioConfig,
|
||||||
@@ -44,7 +45,7 @@ from diffusers import (
|
|||||||
LMSDiscreteScheduler,
|
LMSDiscreteScheduler,
|
||||||
PNDMScheduler,
|
PNDMScheduler,
|
||||||
)
|
)
|
||||||
from diffusers.utils.testing_utils import enable_full_determinism, nightly, torch_device
|
from diffusers.utils.testing_utils import enable_full_determinism, is_torch_version, nightly, torch_device
|
||||||
|
|
||||||
from ..pipeline_params import TEXT_TO_AUDIO_BATCH_PARAMS, TEXT_TO_AUDIO_PARAMS
|
from ..pipeline_params import TEXT_TO_AUDIO_BATCH_PARAMS, TEXT_TO_AUDIO_PARAMS
|
||||||
from ..test_pipelines_common import PipelineTesterMixin
|
from ..test_pipelines_common import PipelineTesterMixin
|
||||||
@@ -474,6 +475,11 @@ class AudioLDM2PipelineFastTests(PipelineTesterMixin, unittest.TestCase):
|
|||||||
# increase tolerance from 1e-4 -> 3e-4 to account for large composite model
|
# increase tolerance from 1e-4 -> 3e-4 to account for large composite model
|
||||||
super().test_dict_tuple_outputs_equivalent(expected_max_difference=3e-4)
|
super().test_dict_tuple_outputs_equivalent(expected_max_difference=3e-4)
|
||||||
|
|
||||||
|
@pytest.mark.xfail(
|
||||||
|
condition=is_torch_version(">=", "2.7"),
|
||||||
|
reason="Test currently fails on PyTorch 2.7.",
|
||||||
|
strict=False,
|
||||||
|
)
|
||||||
def test_inference_batch_single_identical(self):
|
def test_inference_batch_single_identical(self):
|
||||||
# increase tolerance from 1e-4 -> 2e-4 to account for large composite model
|
# increase tolerance from 1e-4 -> 2e-4 to account for large composite model
|
||||||
self._test_inference_batch_single_identical(expected_max_diff=2e-4)
|
self._test_inference_batch_single_identical(expected_max_diff=2e-4)
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import random
|
|||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
import pytest
|
||||||
import torch
|
import torch
|
||||||
from transformers import (
|
from transformers import (
|
||||||
CLIPImageProcessor,
|
CLIPImageProcessor,
|
||||||
@@ -39,6 +40,7 @@ from diffusers.utils.testing_utils import (
|
|||||||
backend_empty_cache,
|
backend_empty_cache,
|
||||||
enable_full_determinism,
|
enable_full_determinism,
|
||||||
floats_tensor,
|
floats_tensor,
|
||||||
|
is_torch_version,
|
||||||
numpy_cosine_similarity_distance,
|
numpy_cosine_similarity_distance,
|
||||||
require_torch_accelerator,
|
require_torch_accelerator,
|
||||||
skip_mps,
|
skip_mps,
|
||||||
@@ -180,6 +182,11 @@ class I2VGenXLPipelineFastTests(SDFunctionTesterMixin, PipelineTesterMixin, unit
|
|||||||
|
|
||||||
assert np.abs(image_slice.flatten() - expected_slice).max() < 1e-2
|
assert np.abs(image_slice.flatten() - expected_slice).max() < 1e-2
|
||||||
|
|
||||||
|
@pytest.mark.xfail(
|
||||||
|
condition=is_torch_version(">=", "2.7"),
|
||||||
|
reason="Test currently fails on PyTorch 2.7.",
|
||||||
|
strict=False,
|
||||||
|
)
|
||||||
def test_save_load_local(self):
|
def test_save_load_local(self):
|
||||||
super().test_save_load_local(expected_max_difference=0.006)
|
super().test_save_load_local(expected_max_difference=0.006)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user