Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
diffusers
Commits
c78ee143
Unverified
Commit
c78ee143
authored
Sep 28, 2023
by
Dhruv Nair
Committed by
GitHub
Sep 28, 2023
Browse files
Move more slow tests to nightly (#5220)
* move to nightly * fix mistake
parent
622f35b1
Changes
14
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
27 additions
and
28 deletions
+27
-28
tests/pipelines/audio_diffusion/test_audio_diffusion.py
tests/pipelines/audio_diffusion/test_audio_diffusion.py
+2
-2
tests/pipelines/audioldm/test_audioldm.py
tests/pipelines/audioldm/test_audioldm.py
+2
-2
tests/pipelines/kandinsky_v22/test_kandinsky_controlnet_img2img.py
...elines/kandinsky_v22/test_kandinsky_controlnet_img2img.py
+2
-2
tests/pipelines/latent_diffusion/test_latent_diffusion_uncond.py
...ipelines/latent_diffusion/test_latent_diffusion_uncond.py
+2
-2
tests/pipelines/stable_diffusion/test_stable_diffusion_k_diffusion.py
...nes/stable_diffusion/test_stable_diffusion_k_diffusion.py
+2
-2
tests/pipelines/stable_diffusion/test_stable_diffusion_model_editing.py
...s/stable_diffusion/test_stable_diffusion_model_editing.py
+2
-2
tests/pipelines/stable_diffusion/test_stable_diffusion_paradigms.py
...lines/stable_diffusion/test_stable_diffusion_paradigms.py
+2
-2
tests/pipelines/stable_diffusion/test_stable_diffusion_sag.py
...s/pipelines/stable_diffusion/test_stable_diffusion_sag.py
+2
-2
tests/pipelines/stable_diffusion_2/test_stable_diffusion_attend_and_excite.py
...le_diffusion_2/test_stable_diffusion_attend_and_excite.py
+2
-2
tests/pipelines/stable_diffusion_2/test_stable_diffusion_diffedit.py
...ines/stable_diffusion_2/test_stable_diffusion_diffedit.py
+1
-2
tests/pipelines/stable_unclip/test_stable_unclip.py
tests/pipelines/stable_unclip/test_stable_unclip.py
+2
-2
tests/pipelines/stable_unclip/test_stable_unclip_img2img.py
tests/pipelines/stable_unclip/test_stable_unclip_img2img.py
+2
-2
tests/pipelines/text_to_video/test_text_to_video_zero.py
tests/pipelines/text_to_video/test_text_to_video_zero.py
+2
-2
tests/pipelines/text_to_video/test_video_to_video.py
tests/pipelines/text_to_video/test_video_to_video.py
+2
-2
No files found.
tests/pipelines/audio_diffusion/test_audio_diffusion.py
View file @
c78ee143
...
@@ -29,7 +29,7 @@ from diffusers import (
...
@@ -29,7 +29,7 @@ from diffusers import (
UNet2DConditionModel
,
UNet2DConditionModel
,
UNet2DModel
,
UNet2DModel
,
)
)
from
diffusers.utils.testing_utils
import
enable_full_determinism
,
nightly
,
require_torch_gpu
,
slow
,
torch_device
from
diffusers.utils.testing_utils
import
enable_full_determinism
,
nightly
,
require_torch_gpu
,
torch_device
enable_full_determinism
()
enable_full_determinism
()
...
@@ -95,7 +95,7 @@ class PipelineFastTests(unittest.TestCase):
...
@@ -95,7 +95,7 @@ class PipelineFastTests(unittest.TestCase):
)
)
return
vqvae
,
unet
return
vqvae
,
unet
@
slow
@
nightly
def
test_audio_diffusion
(
self
):
def
test_audio_diffusion
(
self
):
device
=
"cpu"
# ensure determinism for the device-dependent torch.Generator
device
=
"cpu"
# ensure determinism for the device-dependent torch.Generator
mel
=
Mel
(
mel
=
Mel
(
...
...
tests/pipelines/audioldm/test_audioldm.py
View file @
c78ee143
...
@@ -37,7 +37,7 @@ from diffusers import (
...
@@ -37,7 +37,7 @@ from diffusers import (
UNet2DConditionModel
,
UNet2DConditionModel
,
)
)
from
diffusers.utils
import
is_xformers_available
from
diffusers.utils
import
is_xformers_available
from
diffusers.utils.testing_utils
import
enable_full_determinism
,
nightly
,
slow
,
torch_device
from
diffusers.utils.testing_utils
import
enable_full_determinism
,
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
...
@@ -369,7 +369,7 @@ class AudioLDMPipelineFastTests(PipelineTesterMixin, unittest.TestCase):
...
@@ -369,7 +369,7 @@ class AudioLDMPipelineFastTests(PipelineTesterMixin, unittest.TestCase):
self
.
_test_xformers_attention_forwardGenerator_pass
(
test_mean_pixel_difference
=
False
)
self
.
_test_xformers_attention_forwardGenerator_pass
(
test_mean_pixel_difference
=
False
)
@
slow
@
nightly
class
AudioLDMPipelineSlowTests
(
unittest
.
TestCase
):
class
AudioLDMPipelineSlowTests
(
unittest
.
TestCase
):
def
tearDown
(
self
):
def
tearDown
(
self
):
super
().
tearDown
()
super
().
tearDown
()
...
...
tests/pipelines/kandinsky_v22/test_kandinsky_controlnet_img2img.py
View file @
c78ee143
...
@@ -33,8 +33,8 @@ from diffusers.utils.testing_utils import (
...
@@ -33,8 +33,8 @@ from diffusers.utils.testing_utils import (
floats_tensor
,
floats_tensor
,
load_image
,
load_image
,
load_numpy
,
load_numpy
,
nightly
,
require_torch_gpu
,
require_torch_gpu
,
slow
,
torch_device
,
torch_device
,
)
)
...
@@ -232,7 +232,7 @@ class KandinskyV22ControlnetImg2ImgPipelineFastTests(PipelineTesterMixin, unitte
...
@@ -232,7 +232,7 @@ class KandinskyV22ControlnetImg2ImgPipelineFastTests(PipelineTesterMixin, unitte
super
().
test_float16_inference
(
expected_max_diff
=
2e-1
)
super
().
test_float16_inference
(
expected_max_diff
=
2e-1
)
@
slow
@
nightly
@
require_torch_gpu
@
require_torch_gpu
class
KandinskyV22ControlnetImg2ImgPipelineIntegrationTests
(
unittest
.
TestCase
):
class
KandinskyV22ControlnetImg2ImgPipelineIntegrationTests
(
unittest
.
TestCase
):
def
tearDown
(
self
):
def
tearDown
(
self
):
...
...
tests/pipelines/latent_diffusion/test_latent_diffusion_uncond.py
View file @
c78ee143
...
@@ -20,7 +20,7 @@ import torch
...
@@ -20,7 +20,7 @@ import torch
from
transformers
import
CLIPTextConfig
,
CLIPTextModel
from
transformers
import
CLIPTextConfig
,
CLIPTextModel
from
diffusers
import
DDIMScheduler
,
LDMPipeline
,
UNet2DModel
,
VQModel
from
diffusers
import
DDIMScheduler
,
LDMPipeline
,
UNet2DModel
,
VQModel
from
diffusers.utils.testing_utils
import
enable_full_determinism
,
require_torch
,
slow
,
torch_device
from
diffusers.utils.testing_utils
import
enable_full_determinism
,
nightly
,
require_torch
,
torch_device
enable_full_determinism
()
enable_full_determinism
()
...
@@ -96,7 +96,7 @@ class LDMPipelineFastTests(unittest.TestCase):
...
@@ -96,7 +96,7 @@ class LDMPipelineFastTests(unittest.TestCase):
assert
np
.
abs
(
image_from_tuple_slice
.
flatten
()
-
expected_slice
).
max
()
<
tolerance
assert
np
.
abs
(
image_from_tuple_slice
.
flatten
()
-
expected_slice
).
max
()
<
tolerance
@
slow
@
nightly
@
require_torch
@
require_torch
class
LDMPipelineIntegrationTests
(
unittest
.
TestCase
):
class
LDMPipelineIntegrationTests
(
unittest
.
TestCase
):
def
test_inference_uncond
(
self
):
def
test_inference_uncond
(
self
):
...
...
tests/pipelines/stable_diffusion/test_stable_diffusion_k_diffusion.py
View file @
c78ee143
...
@@ -20,13 +20,13 @@ import numpy as np
...
@@ -20,13 +20,13 @@ import numpy as np
import
torch
import
torch
from
diffusers
import
StableDiffusionKDiffusionPipeline
from
diffusers
import
StableDiffusionKDiffusionPipeline
from
diffusers.utils.testing_utils
import
enable_full_determinism
,
require_torch_gpu
,
slow
,
torch_device
from
diffusers.utils.testing_utils
import
enable_full_determinism
,
nightly
,
require_torch_gpu
,
torch_device
enable_full_determinism
()
enable_full_determinism
()
@
slow
@
nightly
@
require_torch_gpu
@
require_torch_gpu
class
StableDiffusionPipelineIntegrationTests
(
unittest
.
TestCase
):
class
StableDiffusionPipelineIntegrationTests
(
unittest
.
TestCase
):
def
tearDown
(
self
):
def
tearDown
(
self
):
...
...
tests/pipelines/stable_diffusion/test_stable_diffusion_model_editing.py
View file @
c78ee143
...
@@ -28,7 +28,7 @@ from diffusers import (
...
@@ -28,7 +28,7 @@ from diffusers import (
StableDiffusionModelEditingPipeline
,
StableDiffusionModelEditingPipeline
,
UNet2DConditionModel
,
UNet2DConditionModel
,
)
)
from
diffusers.utils.testing_utils
import
enable_full_determinism
,
require_torch_gpu
,
skip_mps
,
slow
,
torch_device
from
diffusers.utils.testing_utils
import
enable_full_determinism
,
nightly
,
require_torch_gpu
,
skip_mps
,
torch_device
from
..pipeline_params
import
TEXT_TO_IMAGE_BATCH_PARAMS
,
TEXT_TO_IMAGE_IMAGE_PARAMS
,
TEXT_TO_IMAGE_PARAMS
from
..pipeline_params
import
TEXT_TO_IMAGE_BATCH_PARAMS
,
TEXT_TO_IMAGE_IMAGE_PARAMS
,
TEXT_TO_IMAGE_PARAMS
from
..test_pipelines_common
import
PipelineKarrasSchedulerTesterMixin
,
PipelineLatentTesterMixin
,
PipelineTesterMixin
from
..test_pipelines_common
import
PipelineKarrasSchedulerTesterMixin
,
PipelineLatentTesterMixin
,
PipelineTesterMixin
...
@@ -184,7 +184,7 @@ class StableDiffusionModelEditingPipelineFastTests(
...
@@ -184,7 +184,7 @@ class StableDiffusionModelEditingPipelineFastTests(
super
().
test_attention_slicing_forward_pass
(
expected_max_diff
=
5e-3
)
super
().
test_attention_slicing_forward_pass
(
expected_max_diff
=
5e-3
)
@
slow
@
nightly
@
require_torch_gpu
@
require_torch_gpu
class
StableDiffusionModelEditingSlowTests
(
unittest
.
TestCase
):
class
StableDiffusionModelEditingSlowTests
(
unittest
.
TestCase
):
def
tearDown
(
self
):
def
tearDown
(
self
):
...
...
tests/pipelines/stable_diffusion/test_stable_diffusion_paradigms.py
View file @
c78ee143
...
@@ -29,8 +29,8 @@ from diffusers import (
...
@@ -29,8 +29,8 @@ from diffusers import (
)
)
from
diffusers.utils.testing_utils
import
(
from
diffusers.utils.testing_utils
import
(
enable_full_determinism
,
enable_full_determinism
,
nightly
,
require_torch_gpu
,
require_torch_gpu
,
slow
,
torch_device
,
torch_device
,
)
)
...
@@ -188,7 +188,7 @@ class StableDiffusionParadigmsPipelineFastTests(PipelineLatentTesterMixin, Pipel
...
@@ -188,7 +188,7 @@ class StableDiffusionParadigmsPipelineFastTests(PipelineLatentTesterMixin, Pipel
assert
np
.
abs
(
image_slice
.
flatten
()
-
expected_slice
).
max
()
<
1e-2
assert
np
.
abs
(
image_slice
.
flatten
()
-
expected_slice
).
max
()
<
1e-2
@
slow
@
nightly
@
require_torch_gpu
@
require_torch_gpu
class
StableDiffusionParadigmsPipelineSlowTests
(
unittest
.
TestCase
):
class
StableDiffusionParadigmsPipelineSlowTests
(
unittest
.
TestCase
):
def
tearDown
(
self
):
def
tearDown
(
self
):
...
...
tests/pipelines/stable_diffusion/test_stable_diffusion_sag.py
View file @
c78ee143
...
@@ -26,7 +26,7 @@ from diffusers import (
...
@@ -26,7 +26,7 @@ from diffusers import (
StableDiffusionSAGPipeline
,
StableDiffusionSAGPipeline
,
UNet2DConditionModel
,
UNet2DConditionModel
,
)
)
from
diffusers.utils.testing_utils
import
enable_full_determinism
,
require_torch_gpu
,
slow
,
torch_device
from
diffusers.utils.testing_utils
import
enable_full_determinism
,
nightly
,
require_torch_gpu
,
torch_device
from
..pipeline_params
import
TEXT_TO_IMAGE_BATCH_PARAMS
,
TEXT_TO_IMAGE_IMAGE_PARAMS
,
TEXT_TO_IMAGE_PARAMS
from
..pipeline_params
import
TEXT_TO_IMAGE_BATCH_PARAMS
,
TEXT_TO_IMAGE_IMAGE_PARAMS
,
TEXT_TO_IMAGE_PARAMS
from
..test_pipelines_common
import
PipelineLatentTesterMixin
,
PipelineTesterMixin
from
..test_pipelines_common
import
PipelineLatentTesterMixin
,
PipelineTesterMixin
...
@@ -115,7 +115,7 @@ class StableDiffusionSAGPipelineFastTests(PipelineLatentTesterMixin, PipelineTes
...
@@ -115,7 +115,7 @@ class StableDiffusionSAGPipelineFastTests(PipelineLatentTesterMixin, PipelineTes
super
().
test_inference_batch_single_identical
(
expected_max_diff
=
3e-3
)
super
().
test_inference_batch_single_identical
(
expected_max_diff
=
3e-3
)
@
slow
@
nightly
@
require_torch_gpu
@
require_torch_gpu
class
StableDiffusionPipelineIntegrationTests
(
unittest
.
TestCase
):
class
StableDiffusionPipelineIntegrationTests
(
unittest
.
TestCase
):
def
tearDown
(
self
):
def
tearDown
(
self
):
...
...
tests/pipelines/stable_diffusion_2/test_stable_diffusion_attend_and_excite.py
View file @
c78ee143
...
@@ -28,10 +28,10 @@ from diffusers import (
...
@@ -28,10 +28,10 @@ from diffusers import (
)
)
from
diffusers.utils.testing_utils
import
(
from
diffusers.utils.testing_utils
import
(
load_numpy
,
load_numpy
,
nightly
,
numpy_cosine_similarity_distance
,
numpy_cosine_similarity_distance
,
require_torch_gpu
,
require_torch_gpu
,
skip_mps
,
skip_mps
,
slow
,
)
)
from
..pipeline_params
import
TEXT_TO_IMAGE_BATCH_PARAMS
,
TEXT_TO_IMAGE_IMAGE_PARAMS
,
TEXT_TO_IMAGE_PARAMS
from
..pipeline_params
import
TEXT_TO_IMAGE_BATCH_PARAMS
,
TEXT_TO_IMAGE_IMAGE_PARAMS
,
TEXT_TO_IMAGE_PARAMS
...
@@ -187,7 +187,7 @@ class StableDiffusionAttendAndExcitePipelineFastTests(
...
@@ -187,7 +187,7 @@ class StableDiffusionAttendAndExcitePipelineFastTests(
@
require_torch_gpu
@
require_torch_gpu
@
slow
@
nightly
class
StableDiffusionAttendAndExcitePipelineIntegrationTests
(
unittest
.
TestCase
):
class
StableDiffusionAttendAndExcitePipelineIntegrationTests
(
unittest
.
TestCase
):
# Attend and excite requires being able to run a backward pass at
# Attend and excite requires being able to run a backward pass at
# inference time. There's no deterministic backward operator for pad
# inference time. There's no deterministic backward operator for pad
...
...
tests/pipelines/stable_diffusion_2/test_stable_diffusion_diffedit.py
View file @
c78ee143
...
@@ -39,7 +39,6 @@ from diffusers.utils.testing_utils import (
...
@@ -39,7 +39,6 @@ from diffusers.utils.testing_utils import (
nightly
,
nightly
,
numpy_cosine_similarity_distance
,
numpy_cosine_similarity_distance
,
require_torch_gpu
,
require_torch_gpu
,
slow
,
torch_device
,
torch_device
,
)
)
...
@@ -292,7 +291,7 @@ class StableDiffusionDiffEditPipelineFastTests(PipelineLatentTesterMixin, Pipeli
...
@@ -292,7 +291,7 @@ class StableDiffusionDiffEditPipelineFastTests(PipelineLatentTesterMixin, Pipeli
@
require_torch_gpu
@
require_torch_gpu
@
slow
@
nightly
class
StableDiffusionDiffEditPipelineIntegrationTests
(
unittest
.
TestCase
):
class
StableDiffusionDiffEditPipelineIntegrationTests
(
unittest
.
TestCase
):
def
tearDown
(
self
):
def
tearDown
(
self
):
super
().
tearDown
()
super
().
tearDown
()
...
...
tests/pipelines/stable_unclip/test_stable_unclip.py
View file @
c78ee143
...
@@ -13,7 +13,7 @@ from diffusers import (
...
@@ -13,7 +13,7 @@ from diffusers import (
UNet2DConditionModel
,
UNet2DConditionModel
,
)
)
from
diffusers.pipelines.stable_diffusion.stable_unclip_image_normalizer
import
StableUnCLIPImageNormalizer
from
diffusers.pipelines.stable_diffusion.stable_unclip_image_normalizer
import
StableUnCLIPImageNormalizer
from
diffusers.utils.testing_utils
import
enable_full_determinism
,
load_numpy
,
require_torch_gpu
,
slow
,
torch_device
from
diffusers.utils.testing_utils
import
enable_full_determinism
,
load_numpy
,
nightly
,
require_torch_gpu
,
torch_device
from
..pipeline_params
import
TEXT_TO_IMAGE_BATCH_PARAMS
,
TEXT_TO_IMAGE_IMAGE_PARAMS
,
TEXT_TO_IMAGE_PARAMS
from
..pipeline_params
import
TEXT_TO_IMAGE_BATCH_PARAMS
,
TEXT_TO_IMAGE_IMAGE_PARAMS
,
TEXT_TO_IMAGE_PARAMS
from
..test_pipelines_common
import
(
from
..test_pipelines_common
import
(
...
@@ -185,7 +185,7 @@ class StableUnCLIPPipelineFastTests(
...
@@ -185,7 +185,7 @@ class StableUnCLIPPipelineFastTests(
self
.
_test_inference_batch_single_identical
(
expected_max_diff
=
1e-3
)
self
.
_test_inference_batch_single_identical
(
expected_max_diff
=
1e-3
)
@
slow
@
nightly
@
require_torch_gpu
@
require_torch_gpu
class
StableUnCLIPPipelineIntegrationTests
(
unittest
.
TestCase
):
class
StableUnCLIPPipelineIntegrationTests
(
unittest
.
TestCase
):
def
tearDown
(
self
):
def
tearDown
(
self
):
...
...
tests/pipelines/stable_unclip/test_stable_unclip_img2img.py
View file @
c78ee143
...
@@ -22,9 +22,9 @@ from diffusers.utils.testing_utils import (
...
@@ -22,9 +22,9 @@ from diffusers.utils.testing_utils import (
floats_tensor
,
floats_tensor
,
load_image
,
load_image
,
load_numpy
,
load_numpy
,
nightly
,
require_torch_gpu
,
require_torch_gpu
,
skip_mps
,
skip_mps
,
slow
,
torch_device
,
torch_device
,
)
)
...
@@ -206,7 +206,7 @@ class StableUnCLIPImg2ImgPipelineFastTests(
...
@@ -206,7 +206,7 @@ class StableUnCLIPImg2ImgPipelineFastTests(
self
.
_test_xformers_attention_forwardGenerator_pass
(
test_max_difference
=
False
)
self
.
_test_xformers_attention_forwardGenerator_pass
(
test_max_difference
=
False
)
@
slow
@
nightly
@
require_torch_gpu
@
require_torch_gpu
class
StableUnCLIPImg2ImgPipelineIntegrationTests
(
unittest
.
TestCase
):
class
StableUnCLIPImg2ImgPipelineIntegrationTests
(
unittest
.
TestCase
):
def
tearDown
(
self
):
def
tearDown
(
self
):
...
...
tests/pipelines/text_to_video/test_text_to_video_zero.py
View file @
c78ee143
...
@@ -18,12 +18,12 @@ import unittest
...
@@ -18,12 +18,12 @@ import unittest
import
torch
import
torch
from
diffusers
import
DDIMScheduler
,
TextToVideoZeroPipeline
from
diffusers
import
DDIMScheduler
,
TextToVideoZeroPipeline
from
diffusers.utils.testing_utils
import
load_pt
,
require_torch_gpu
,
slow
from
diffusers.utils.testing_utils
import
load_pt
,
nightly
,
require_torch_gpu
from
..test_pipelines_common
import
assert_mean_pixel_difference
from
..test_pipelines_common
import
assert_mean_pixel_difference
@
slow
@
nightly
@
require_torch_gpu
@
require_torch_gpu
class
TextToVideoZeroPipelineSlowTests
(
unittest
.
TestCase
):
class
TextToVideoZeroPipelineSlowTests
(
unittest
.
TestCase
):
def
test_full_model
(
self
):
def
test_full_model
(
self
):
...
...
tests/pipelines/text_to_video/test_video_to_video.py
View file @
c78ee143
...
@@ -31,9 +31,9 @@ from diffusers.utils.testing_utils import (
...
@@ -31,9 +31,9 @@ from diffusers.utils.testing_utils import (
enable_full_determinism
,
enable_full_determinism
,
floats_tensor
,
floats_tensor
,
is_flaky
,
is_flaky
,
nightly
,
numpy_cosine_similarity_distance
,
numpy_cosine_similarity_distance
,
skip_mps
,
skip_mps
,
slow
,
torch_device
,
torch_device
,
)
)
...
@@ -195,7 +195,7 @@ class VideoToVideoSDPipelineFastTests(PipelineTesterMixin, unittest.TestCase):
...
@@ -195,7 +195,7 @@ class VideoToVideoSDPipelineFastTests(PipelineTesterMixin, unittest.TestCase):
return
super
().
test_progress_bar
()
return
super
().
test_progress_bar
()
@
slow
@
nightly
@
skip_mps
@
skip_mps
class
VideoToVideoSDPipelineSlowTests
(
unittest
.
TestCase
):
class
VideoToVideoSDPipelineSlowTests
(
unittest
.
TestCase
):
def
test_two_step_model
(
self
):
def
test_two_step_model
(
self
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment