Skip to content

Commit 79a3f39

Browse files
authored
Move to slow tests to nightly (huggingface#5093)
* move slow tests to nightly * move slow tests to nightly
1 parent 431dd2f commit 79a3f39

File tree

13 files changed

+31
-26
lines changed

13 files changed

+31
-26
lines changed

tests/pipelines/audioldm2/test_audioldm2.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
PNDMScheduler,
4646
)
4747
from diffusers.utils import is_xformers_available
48-
from diffusers.utils.testing_utils import enable_full_determinism, slow, torch_device
48+
from diffusers.utils.testing_utils import enable_full_determinism, nightly, torch_device
4949

5050
from ..pipeline_params import TEXT_TO_AUDIO_BATCH_PARAMS, TEXT_TO_AUDIO_PARAMS
5151
from ..test_pipelines_common import PipelineTesterMixin
@@ -492,7 +492,7 @@ def test_to_dtype(self):
492492
self.assertTrue(all(dtype == torch.float16 for dtype in model_dtypes.values()))
493493

494494

495-
@slow
495+
@nightly
496496
class AudioLDM2PipelineSlowTests(unittest.TestCase):
497497
def tearDown(self):
498498
super().tearDown()

tests/pipelines/kandinsky/test_kandinsky_inpaint.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
floats_tensor,
3030
load_image,
3131
load_numpy,
32+
nightly,
3233
require_torch_gpu,
33-
slow,
3434
torch_device,
3535
)
3636

@@ -291,7 +291,7 @@ def test_offloads(self):
291291
assert np.abs(image_slices[0] - image_slices[2]).max() < 1e-3
292292

293293

294-
@slow
294+
@nightly
295295
@require_torch_gpu
296296
class KandinskyInpaintPipelineIntegrationTests(unittest.TestCase):
297297
def tearDown(self):

tests/pipelines/kandinsky_v22/test_kandinsky_controlnet.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
floats_tensor,
3333
load_image,
3434
load_numpy,
35+
nightly,
3536
require_torch_gpu,
36-
slow,
3737
torch_device,
3838
)
3939

@@ -219,7 +219,7 @@ def test_kandinsky_controlnet(self):
219219
), f" expected_slice {expected_slice}, but got {image_from_tuple_slice.flatten()}"
220220

221221

222-
@slow
222+
@nightly
223223
@require_torch_gpu
224224
class KandinskyV22ControlnetPipelineIntegrationTests(unittest.TestCase):
225225
def tearDown(self):

tests/pipelines/latent_diffusion/test_latent_diffusion.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
load_numpy,
2727
nightly,
2828
require_torch_gpu,
29-
slow,
3029
torch_device,
3130
)
3231

@@ -136,7 +135,7 @@ def test_inference_text2img(self):
136135
assert np.abs(image_slice.flatten() - expected_slice).max() < 1e-3
137136

138137

139-
@slow
138+
@nightly
140139
@require_torch_gpu
141140
class LDMTextToImagePipelineSlowTests(unittest.TestCase):
142141
def tearDown(self):

tests/pipelines/latent_diffusion/test_latent_diffusion_superresolution.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
enable_full_determinism,
2626
floats_tensor,
2727
load_image,
28+
nightly,
2829
require_torch,
29-
slow,
3030
torch_device,
3131
)
3232

@@ -114,7 +114,7 @@ def test_inference_superresolution_fp16(self):
114114
assert image.shape == (1, 64, 64, 3)
115115

116116

117-
@slow
117+
@nightly
118118
@require_torch
119119
class LDMSuperResolutionPipelineIntegrationTests(unittest.TestCase):
120120
def test_inference_superresolution(self):

tests/pipelines/shap_e/test_shap_e.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
from diffusers import HeunDiscreteScheduler, PriorTransformer, ShapEPipeline
2323
from diffusers.pipelines.shap_e import ShapERenderer
24-
from diffusers.utils.testing_utils import load_numpy, require_torch_gpu, slow, torch_device
24+
from diffusers.utils.testing_utils import load_numpy, nightly, require_torch_gpu, torch_device
2525

2626
from ..test_pipelines_common import PipelineTesterMixin, assert_mean_pixel_difference
2727

@@ -230,7 +230,7 @@ def test_num_images_per_prompt(self):
230230
assert images.shape[0] == batch_size * num_images_per_prompt
231231

232232

233-
@slow
233+
@nightly
234234
@require_torch_gpu
235235
class ShapEPipelineIntegrationTests(unittest.TestCase):
236236
def tearDown(self):

tests/pipelines/shap_e/test_shap_e_img2img.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,14 @@
2222

2323
from diffusers import HeunDiscreteScheduler, PriorTransformer, ShapEImg2ImgPipeline
2424
from diffusers.pipelines.shap_e import ShapERenderer
25-
from diffusers.utils.testing_utils import floats_tensor, load_image, load_numpy, require_torch_gpu, slow, torch_device
25+
from diffusers.utils.testing_utils import (
26+
floats_tensor,
27+
load_image,
28+
load_numpy,
29+
nightly,
30+
require_torch_gpu,
31+
torch_device,
32+
)
2633

2734
from ..test_pipelines_common import PipelineTesterMixin, assert_mean_pixel_difference
2835

@@ -243,7 +250,7 @@ def test_num_images_per_prompt(self):
243250
assert images.shape[0] == batch_size * num_images_per_prompt
244251

245252

246-
@slow
253+
@nightly
247254
@require_torch_gpu
248255
class ShapEImg2ImgPipelineIntegrationTests(unittest.TestCase):
249256
def tearDown(self):

tests/pipelines/stable_diffusion/test_cycle_diffusion.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727
floats_tensor,
2828
load_image,
2929
load_numpy,
30+
nightly,
3031
require_torch_gpu,
3132
skip_mps,
32-
slow,
3333
torch_device,
3434
)
3535

@@ -194,7 +194,7 @@ def test_attention_slicing_forward_pass(self):
194194
return super().test_attention_slicing_forward_pass()
195195

196196

197-
@slow
197+
@nightly
198198
@require_torch_gpu
199199
class CycleDiffusionPipelineIntegrationTests(unittest.TestCase):
200200
def tearDown(self):

tests/pipelines/stable_diffusion/test_stable_diffusion_ldm3d.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
StableDiffusionLDM3DPipeline,
2929
UNet2DConditionModel,
3030
)
31-
from diffusers.utils.testing_utils import enable_full_determinism, nightly, require_torch_gpu, slow, torch_device
31+
from diffusers.utils.testing_utils import enable_full_determinism, nightly, require_torch_gpu, torch_device
3232

3333
from ..pipeline_params import TEXT_TO_IMAGE_BATCH_PARAMS, TEXT_TO_IMAGE_IMAGE_PARAMS, TEXT_TO_IMAGE_PARAMS
3434

@@ -203,7 +203,7 @@ def test_stable_diffusion_negative_prompt(self):
203203
assert np.abs(depth_slice.flatten() - expected_slice_depth).max() < 1e-2
204204

205205

206-
@slow
206+
@nightly
207207
@require_torch_gpu
208208
class StableDiffusionLDM3DPipelineSlowTests(unittest.TestCase):
209209
def tearDown(self):

tests/pipelines/stable_diffusion_2/test_stable_diffusion_flax.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
from diffusers import FlaxDPMSolverMultistepScheduler, FlaxStableDiffusionPipeline
2020
from diffusers.utils import is_flax_available
21-
from diffusers.utils.testing_utils import nightly, require_flax, slow
21+
from diffusers.utils.testing_utils import nightly, require_flax
2222

2323

2424
if is_flax_available():
@@ -28,7 +28,7 @@
2828
from flax.training.common_utils import shard
2929

3030

31-
@slow
31+
@nightly
3232
@require_flax
3333
class FlaxStableDiffusion2PipelineIntegrationTests(unittest.TestCase):
3434
def tearDown(self):

0 commit comments

Comments
 (0)