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
renzhc
diffusers_dcu
Commits
79a3f39e
Unverified
Commit
79a3f39e
authored
Sep 19, 2023
by
Dhruv Nair
Committed by
GitHub
Sep 19, 2023
Browse files
Move to slow tests to nightly (#5093)
* move slow tests to nightly * move slow tests to nightly
parent
431dd2f4
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
31 additions
and
26 deletions
+31
-26
tests/pipelines/audioldm2/test_audioldm2.py
tests/pipelines/audioldm2/test_audioldm2.py
+2
-2
tests/pipelines/kandinsky/test_kandinsky_inpaint.py
tests/pipelines/kandinsky/test_kandinsky_inpaint.py
+2
-2
tests/pipelines/kandinsky_v22/test_kandinsky_controlnet.py
tests/pipelines/kandinsky_v22/test_kandinsky_controlnet.py
+2
-2
tests/pipelines/latent_diffusion/test_latent_diffusion.py
tests/pipelines/latent_diffusion/test_latent_diffusion.py
+1
-2
tests/pipelines/latent_diffusion/test_latent_diffusion_superresolution.py
...latent_diffusion/test_latent_diffusion_superresolution.py
+2
-2
tests/pipelines/shap_e/test_shap_e.py
tests/pipelines/shap_e/test_shap_e.py
+2
-2
tests/pipelines/shap_e/test_shap_e_img2img.py
tests/pipelines/shap_e/test_shap_e_img2img.py
+9
-2
tests/pipelines/stable_diffusion/test_cycle_diffusion.py
tests/pipelines/stable_diffusion/test_cycle_diffusion.py
+2
-2
tests/pipelines/stable_diffusion/test_stable_diffusion_ldm3d.py
...pipelines/stable_diffusion/test_stable_diffusion_ldm3d.py
+2
-2
tests/pipelines/stable_diffusion_2/test_stable_diffusion_flax.py
...ipelines/stable_diffusion_2/test_stable_diffusion_flax.py
+2
-2
tests/pipelines/unclip/test_unclip.py
tests/pipelines/unclip/test_unclip.py
+1
-2
tests/pipelines/unclip/test_unclip_image_variation.py
tests/pipelines/unclip/test_unclip_image_variation.py
+2
-2
tests/pipelines/unidiffuser/test_unidiffuser.py
tests/pipelines/unidiffuser/test_unidiffuser.py
+2
-2
No files found.
tests/pipelines/audioldm2/test_audioldm2.py
View file @
79a3f39e
...
@@ -45,7 +45,7 @@ from diffusers import (
...
@@ -45,7 +45,7 @@ from diffusers import (
PNDMScheduler
,
PNDMScheduler
,
)
)
from
diffusers.utils
import
is_xformers_available
from
diffusers.utils
import
is_xformers_available
from
diffusers.utils.testing_utils
import
enable_full_determinism
,
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
...
@@ -492,7 +492,7 @@ class AudioLDM2PipelineFastTests(PipelineTesterMixin, unittest.TestCase):
...
@@ -492,7 +492,7 @@ class AudioLDM2PipelineFastTests(PipelineTesterMixin, unittest.TestCase):
self
.
assertTrue
(
all
(
dtype
==
torch
.
float16
for
dtype
in
model_dtypes
.
values
()))
self
.
assertTrue
(
all
(
dtype
==
torch
.
float16
for
dtype
in
model_dtypes
.
values
()))
@
slow
@
nightly
class
AudioLDM2PipelineSlowTests
(
unittest
.
TestCase
):
class
AudioLDM2PipelineSlowTests
(
unittest
.
TestCase
):
def
tearDown
(
self
):
def
tearDown
(
self
):
super
().
tearDown
()
super
().
tearDown
()
...
...
tests/pipelines/kandinsky/test_kandinsky_inpaint.py
View file @
79a3f39e
...
@@ -29,8 +29,8 @@ from diffusers.utils.testing_utils import (
...
@@ -29,8 +29,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
,
)
)
...
@@ -291,7 +291,7 @@ class KandinskyInpaintPipelineFastTests(PipelineTesterMixin, unittest.TestCase):
...
@@ -291,7 +291,7 @@ class KandinskyInpaintPipelineFastTests(PipelineTesterMixin, unittest.TestCase):
assert
np
.
abs
(
image_slices
[
0
]
-
image_slices
[
2
]).
max
()
<
1e-3
assert
np
.
abs
(
image_slices
[
0
]
-
image_slices
[
2
]).
max
()
<
1e-3
@
slow
@
nightly
@
require_torch_gpu
@
require_torch_gpu
class
KandinskyInpaintPipelineIntegrationTests
(
unittest
.
TestCase
):
class
KandinskyInpaintPipelineIntegrationTests
(
unittest
.
TestCase
):
def
tearDown
(
self
):
def
tearDown
(
self
):
...
...
tests/pipelines/kandinsky_v22/test_kandinsky_controlnet.py
View file @
79a3f39e
...
@@ -32,8 +32,8 @@ from diffusers.utils.testing_utils import (
...
@@ -32,8 +32,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
,
)
)
...
@@ -219,7 +219,7 @@ class KandinskyV22ControlnetPipelineFastTests(PipelineTesterMixin, unittest.Test
...
@@ -219,7 +219,7 @@ class KandinskyV22ControlnetPipelineFastTests(PipelineTesterMixin, unittest.Test
),
f
" expected_slice
{
expected_slice
}
, but got
{
image_from_tuple_slice
.
flatten
()
}
"
),
f
" expected_slice
{
expected_slice
}
, but got
{
image_from_tuple_slice
.
flatten
()
}
"
@
slow
@
nightly
@
require_torch_gpu
@
require_torch_gpu
class
KandinskyV22ControlnetPipelineIntegrationTests
(
unittest
.
TestCase
):
class
KandinskyV22ControlnetPipelineIntegrationTests
(
unittest
.
TestCase
):
def
tearDown
(
self
):
def
tearDown
(
self
):
...
...
tests/pipelines/latent_diffusion/test_latent_diffusion.py
View file @
79a3f39e
...
@@ -26,7 +26,6 @@ from diffusers.utils.testing_utils import (
...
@@ -26,7 +26,6 @@ from diffusers.utils.testing_utils import (
load_numpy
,
load_numpy
,
nightly
,
nightly
,
require_torch_gpu
,
require_torch_gpu
,
slow
,
torch_device
,
torch_device
,
)
)
...
@@ -136,7 +135,7 @@ class LDMTextToImagePipelineFastTests(PipelineTesterMixin, unittest.TestCase):
...
@@ -136,7 +135,7 @@ class LDMTextToImagePipelineFastTests(PipelineTesterMixin, unittest.TestCase):
assert
np
.
abs
(
image_slice
.
flatten
()
-
expected_slice
).
max
()
<
1e-3
assert
np
.
abs
(
image_slice
.
flatten
()
-
expected_slice
).
max
()
<
1e-3
@
slow
@
nightly
@
require_torch_gpu
@
require_torch_gpu
class
LDMTextToImagePipelineSlowTests
(
unittest
.
TestCase
):
class
LDMTextToImagePipelineSlowTests
(
unittest
.
TestCase
):
def
tearDown
(
self
):
def
tearDown
(
self
):
...
...
tests/pipelines/latent_diffusion/test_latent_diffusion_superresolution.py
View file @
79a3f39e
...
@@ -25,8 +25,8 @@ from diffusers.utils.testing_utils import (
...
@@ -25,8 +25,8 @@ from diffusers.utils.testing_utils import (
enable_full_determinism
,
enable_full_determinism
,
floats_tensor
,
floats_tensor
,
load_image
,
load_image
,
nightly
,
require_torch
,
require_torch
,
slow
,
torch_device
,
torch_device
,
)
)
...
@@ -114,7 +114,7 @@ class LDMSuperResolutionPipelineFastTests(unittest.TestCase):
...
@@ -114,7 +114,7 @@ class LDMSuperResolutionPipelineFastTests(unittest.TestCase):
assert
image
.
shape
==
(
1
,
64
,
64
,
3
)
assert
image
.
shape
==
(
1
,
64
,
64
,
3
)
@
slow
@
nightly
@
require_torch
@
require_torch
class
LDMSuperResolutionPipelineIntegrationTests
(
unittest
.
TestCase
):
class
LDMSuperResolutionPipelineIntegrationTests
(
unittest
.
TestCase
):
def
test_inference_superresolution
(
self
):
def
test_inference_superresolution
(
self
):
...
...
tests/pipelines/shap_e/test_shap_e.py
View file @
79a3f39e
...
@@ -21,7 +21,7 @@ from transformers import CLIPTextConfig, CLIPTextModelWithProjection, CLIPTokeni
...
@@ -21,7 +21,7 @@ from transformers import CLIPTextConfig, CLIPTextModelWithProjection, CLIPTokeni
from
diffusers
import
HeunDiscreteScheduler
,
PriorTransformer
,
ShapEPipeline
from
diffusers
import
HeunDiscreteScheduler
,
PriorTransformer
,
ShapEPipeline
from
diffusers.pipelines.shap_e
import
ShapERenderer
from
diffusers.pipelines.shap_e
import
ShapERenderer
from
diffusers.utils.testing_utils
import
load_numpy
,
require_torch_gpu
,
slow
,
torch_device
from
diffusers.utils.testing_utils
import
load_numpy
,
nightly
,
require_torch_gpu
,
torch_device
from
..test_pipelines_common
import
PipelineTesterMixin
,
assert_mean_pixel_difference
from
..test_pipelines_common
import
PipelineTesterMixin
,
assert_mean_pixel_difference
...
@@ -230,7 +230,7 @@ class ShapEPipelineFastTests(PipelineTesterMixin, unittest.TestCase):
...
@@ -230,7 +230,7 @@ class ShapEPipelineFastTests(PipelineTesterMixin, unittest.TestCase):
assert
images
.
shape
[
0
]
==
batch_size
*
num_images_per_prompt
assert
images
.
shape
[
0
]
==
batch_size
*
num_images_per_prompt
@
slow
@
nightly
@
require_torch_gpu
@
require_torch_gpu
class
ShapEPipelineIntegrationTests
(
unittest
.
TestCase
):
class
ShapEPipelineIntegrationTests
(
unittest
.
TestCase
):
def
tearDown
(
self
):
def
tearDown
(
self
):
...
...
tests/pipelines/shap_e/test_shap_e_img2img.py
View file @
79a3f39e
...
@@ -22,7 +22,14 @@ from transformers import CLIPImageProcessor, CLIPVisionConfig, CLIPVisionModel
...
@@ -22,7 +22,14 @@ from transformers import CLIPImageProcessor, CLIPVisionConfig, CLIPVisionModel
from
diffusers
import
HeunDiscreteScheduler
,
PriorTransformer
,
ShapEImg2ImgPipeline
from
diffusers
import
HeunDiscreteScheduler
,
PriorTransformer
,
ShapEImg2ImgPipeline
from
diffusers.pipelines.shap_e
import
ShapERenderer
from
diffusers.pipelines.shap_e
import
ShapERenderer
from
diffusers.utils.testing_utils
import
floats_tensor
,
load_image
,
load_numpy
,
require_torch_gpu
,
slow
,
torch_device
from
diffusers.utils.testing_utils
import
(
floats_tensor
,
load_image
,
load_numpy
,
nightly
,
require_torch_gpu
,
torch_device
,
)
from
..test_pipelines_common
import
PipelineTesterMixin
,
assert_mean_pixel_difference
from
..test_pipelines_common
import
PipelineTesterMixin
,
assert_mean_pixel_difference
...
@@ -243,7 +250,7 @@ class ShapEImg2ImgPipelineFastTests(PipelineTesterMixin, unittest.TestCase):
...
@@ -243,7 +250,7 @@ class ShapEImg2ImgPipelineFastTests(PipelineTesterMixin, unittest.TestCase):
assert
images
.
shape
[
0
]
==
batch_size
*
num_images_per_prompt
assert
images
.
shape
[
0
]
==
batch_size
*
num_images_per_prompt
@
slow
@
nightly
@
require_torch_gpu
@
require_torch_gpu
class
ShapEImg2ImgPipelineIntegrationTests
(
unittest
.
TestCase
):
class
ShapEImg2ImgPipelineIntegrationTests
(
unittest
.
TestCase
):
def
tearDown
(
self
):
def
tearDown
(
self
):
...
...
tests/pipelines/stable_diffusion/test_cycle_diffusion.py
View file @
79a3f39e
...
@@ -27,9 +27,9 @@ from diffusers.utils.testing_utils import (
...
@@ -27,9 +27,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
,
)
)
...
@@ -194,7 +194,7 @@ class CycleDiffusionPipelineFastTests(PipelineLatentTesterMixin, PipelineTesterM
...
@@ -194,7 +194,7 @@ class CycleDiffusionPipelineFastTests(PipelineLatentTesterMixin, PipelineTesterM
return
super
().
test_attention_slicing_forward_pass
()
return
super
().
test_attention_slicing_forward_pass
()
@
slow
@
nightly
@
require_torch_gpu
@
require_torch_gpu
class
CycleDiffusionPipelineIntegrationTests
(
unittest
.
TestCase
):
class
CycleDiffusionPipelineIntegrationTests
(
unittest
.
TestCase
):
def
tearDown
(
self
):
def
tearDown
(
self
):
...
...
tests/pipelines/stable_diffusion/test_stable_diffusion_ldm3d.py
View file @
79a3f39e
...
@@ -28,7 +28,7 @@ from diffusers import (
...
@@ -28,7 +28,7 @@ from diffusers import (
StableDiffusionLDM3DPipeline
,
StableDiffusionLDM3DPipeline
,
UNet2DConditionModel
,
UNet2DConditionModel
,
)
)
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
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
...
@@ -203,7 +203,7 @@ class StableDiffusionLDM3DPipelineFastTests(unittest.TestCase):
...
@@ -203,7 +203,7 @@ class StableDiffusionLDM3DPipelineFastTests(unittest.TestCase):
assert
np
.
abs
(
depth_slice
.
flatten
()
-
expected_slice_depth
).
max
()
<
1e-2
assert
np
.
abs
(
depth_slice
.
flatten
()
-
expected_slice_depth
).
max
()
<
1e-2
@
slow
@
nightly
@
require_torch_gpu
@
require_torch_gpu
class
StableDiffusionLDM3DPipelineSlowTests
(
unittest
.
TestCase
):
class
StableDiffusionLDM3DPipelineSlowTests
(
unittest
.
TestCase
):
def
tearDown
(
self
):
def
tearDown
(
self
):
...
...
tests/pipelines/stable_diffusion_2/test_stable_diffusion_flax.py
View file @
79a3f39e
...
@@ -18,7 +18,7 @@ import unittest
...
@@ -18,7 +18,7 @@ import unittest
from
diffusers
import
FlaxDPMSolverMultistepScheduler
,
FlaxStableDiffusionPipeline
from
diffusers
import
FlaxDPMSolverMultistepScheduler
,
FlaxStableDiffusionPipeline
from
diffusers.utils
import
is_flax_available
from
diffusers.utils
import
is_flax_available
from
diffusers.utils.testing_utils
import
nightly
,
require_flax
,
slow
from
diffusers.utils.testing_utils
import
nightly
,
require_flax
if
is_flax_available
():
if
is_flax_available
():
...
@@ -28,7 +28,7 @@ if is_flax_available():
...
@@ -28,7 +28,7 @@ if is_flax_available():
from
flax.training.common_utils
import
shard
from
flax.training.common_utils
import
shard
@
slow
@
nightly
@
require_flax
@
require_flax
class
FlaxStableDiffusion2PipelineIntegrationTests
(
unittest
.
TestCase
):
class
FlaxStableDiffusion2PipelineIntegrationTests
(
unittest
.
TestCase
):
def
tearDown
(
self
):
def
tearDown
(
self
):
...
...
tests/pipelines/unclip/test_unclip.py
View file @
79a3f39e
...
@@ -28,7 +28,6 @@ from diffusers.utils.testing_utils import (
...
@@ -28,7 +28,6 @@ from diffusers.utils.testing_utils import (
nightly
,
nightly
,
require_torch_gpu
,
require_torch_gpu
,
skip_mps
,
skip_mps
,
slow
,
torch_device
,
torch_device
,
)
)
...
@@ -451,7 +450,7 @@ class UnCLIPPipelineCPUIntegrationTests(unittest.TestCase):
...
@@ -451,7 +450,7 @@ class UnCLIPPipelineCPUIntegrationTests(unittest.TestCase):
assert
np
.
abs
(
expected_image
-
image
).
max
()
<
1e-1
assert
np
.
abs
(
expected_image
-
image
).
max
()
<
1e-1
@
slow
@
nightly
@
require_torch_gpu
@
require_torch_gpu
class
UnCLIPPipelineIntegrationTests
(
unittest
.
TestCase
):
class
UnCLIPPipelineIntegrationTests
(
unittest
.
TestCase
):
def
tearDown
(
self
):
def
tearDown
(
self
):
...
...
tests/pipelines/unclip/test_unclip_image_variation.py
View file @
79a3f39e
...
@@ -41,9 +41,9 @@ from diffusers.utils.testing_utils import (
...
@@ -41,9 +41,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
,
)
)
...
@@ -492,7 +492,7 @@ class UnCLIPImageVariationPipelineFastTests(PipelineTesterMixin, unittest.TestCa
...
@@ -492,7 +492,7 @@ class UnCLIPImageVariationPipelineFastTests(PipelineTesterMixin, unittest.TestCa
return
super
().
test_save_load_optional_components
()
return
super
().
test_save_load_optional_components
()
@
slow
@
nightly
@
require_torch_gpu
@
require_torch_gpu
class
UnCLIPImageVariationPipelineIntegrationTests
(
unittest
.
TestCase
):
class
UnCLIPImageVariationPipelineIntegrationTests
(
unittest
.
TestCase
):
def
tearDown
(
self
):
def
tearDown
(
self
):
...
...
tests/pipelines/unidiffuser/test_unidiffuser.py
View file @
79a3f39e
...
@@ -20,7 +20,7 @@ from diffusers import (
...
@@ -20,7 +20,7 @@ from diffusers import (
UniDiffuserPipeline
,
UniDiffuserPipeline
,
UniDiffuserTextDecoder
,
UniDiffuserTextDecoder
,
)
)
from
diffusers.utils.testing_utils
import
floats_tensor
,
load_image
,
nightly
,
require_torch_gpu
,
slow
,
torch_device
from
diffusers.utils.testing_utils
import
floats_tensor
,
load_image
,
nightly
,
require_torch_gpu
,
torch_device
from
diffusers.utils.torch_utils
import
randn_tensor
from
diffusers.utils.torch_utils
import
randn_tensor
from
..pipeline_params
import
TEXT_GUIDED_IMAGE_VARIATION_BATCH_PARAMS
,
TEXT_GUIDED_IMAGE_VARIATION_PARAMS
from
..pipeline_params
import
TEXT_GUIDED_IMAGE_VARIATION_BATCH_PARAMS
,
TEXT_GUIDED_IMAGE_VARIATION_PARAMS
...
@@ -517,7 +517,7 @@ class UniDiffuserPipelineFastTests(PipelineTesterMixin, unittest.TestCase):
...
@@ -517,7 +517,7 @@ class UniDiffuserPipelineFastTests(PipelineTesterMixin, unittest.TestCase):
assert
text
[
0
][:
len
(
expected_text_prefix
)]
==
expected_text_prefix
assert
text
[
0
][:
len
(
expected_text_prefix
)]
==
expected_text_prefix
@
slow
@
nightly
@
require_torch_gpu
@
require_torch_gpu
class
UniDiffuserPipelineSlowTests
(
unittest
.
TestCase
):
class
UniDiffuserPipelineSlowTests
(
unittest
.
TestCase
):
def
tearDown
(
self
):
def
tearDown
(
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