Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
diffusers
Commits
6cbd7b8b
Unverified
Commit
6cbd7b8b
authored
Feb 13, 2023
by
Patrick von Platen
Committed by
GitHub
Feb 13, 2023
Browse files
[Tests] Remove unnecessary tests (#2337)
parent
bc0cee9d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
35 deletions
+0
-35
tests/pipelines/stable_diffusion_2/test_stable_diffusion_depth.py
...pelines/stable_diffusion_2/test_stable_diffusion_depth.py
+0
-4
tests/test_pipelines_common.py
tests/test_pipelines_common.py
+0
-31
No files found.
tests/pipelines/stable_diffusion_2/test_stable_diffusion_depth.py
View file @
6cbd7b8b
...
@@ -265,10 +265,6 @@ class StableDiffusionDepth2ImgPipelineFastTests(PipelineTesterMixin, unittest.Te
...
@@ -265,10 +265,6 @@ class StableDiffusionDepth2ImgPipelineFastTests(PipelineTesterMixin, unittest.Te
max_diff
=
np
.
abs
(
output
-
output_tuple
).
max
()
max_diff
=
np
.
abs
(
output
-
output_tuple
).
max
()
self
.
assertLess
(
max_diff
,
1e-4
)
self
.
assertLess
(
max_diff
,
1e-4
)
@
unittest
.
skipIf
(
torch_device
==
"mps"
,
reason
=
"The depth model does not support MPS yet"
)
def
test_num_inference_steps_consistent
(
self
):
super
().
test_num_inference_steps_consistent
()
@
unittest
.
skipIf
(
torch_device
==
"mps"
,
reason
=
"The depth model does not support MPS yet"
)
@
unittest
.
skipIf
(
torch_device
==
"mps"
,
reason
=
"The depth model does not support MPS yet"
)
def
test_progress_bar
(
self
):
def
test_progress_bar
(
self
):
super
().
test_progress_bar
()
super
().
test_progress_bar
()
...
...
tests/test_pipelines_common.py
View file @
6cbd7b8b
...
@@ -4,7 +4,6 @@ import inspect
...
@@ -4,7 +4,6 @@ import inspect
import
io
import
io
import
re
import
re
import
tempfile
import
tempfile
import
time
import
unittest
import
unittest
from
typing
import
Callable
,
Union
from
typing
import
Callable
,
Union
...
@@ -294,36 +293,6 @@ class PipelineTesterMixin:
...
@@ -294,36 +293,6 @@ class PipelineTesterMixin:
max_diff
=
np
.
abs
(
output
-
output_tuple
).
max
()
max_diff
=
np
.
abs
(
output
-
output_tuple
).
max
()
self
.
assertLess
(
max_diff
,
1e-4
)
self
.
assertLess
(
max_diff
,
1e-4
)
def
test_num_inference_steps_consistent
(
self
):
components
=
self
.
get_dummy_components
()
pipe
=
self
.
pipeline_class
(
**
components
)
pipe
.
to
(
torch_device
)
pipe
.
set_progress_bar_config
(
disable
=
None
)
# Warmup pass when using mps (see #372)
if
torch_device
==
"mps"
:
_
=
pipe
(
**
self
.
get_dummy_inputs
(
torch_device
))
outputs
=
[]
times
=
[]
for
num_steps
in
[
9
,
6
,
3
]:
inputs
=
self
.
get_dummy_inputs
(
torch_device
)
for
arg
in
self
.
num_inference_steps_args
:
inputs
[
arg
]
=
num_steps
start_time
=
time
.
time
()
output
=
pipe
(
**
inputs
)[
0
]
inference_time
=
time
.
time
()
-
start_time
outputs
.
append
(
output
)
times
.
append
(
inference_time
)
# check that all outputs have the same shape
self
.
assertTrue
(
all
(
outputs
[
0
].
shape
==
output
.
shape
for
output
in
outputs
))
# check that the inference time increases with the number of inference steps
self
.
assertTrue
(
all
(
times
[
i
]
<
times
[
i
-
1
]
for
i
in
range
(
1
,
len
(
times
))))
def
test_components_function
(
self
):
def
test_components_function
(
self
):
init_components
=
self
.
get_dummy_components
()
init_components
=
self
.
get_dummy_components
()
pipe
=
self
.
pipeline_class
(
**
init_components
)
pipe
=
self
.
pipeline_class
(
**
init_components
)
...
...
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