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
90a624f6
Commit
90a624f6
authored
Feb 16, 2023
by
Patrick von Platen
Browse files
improve tests
parent
d32e9391
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
tests/pipelines/stable_diffusion/test_stable_diffusion_sag.py
...s/pipelines/stable_diffusion/test_stable_diffusion_sag.py
+2
-2
No files found.
tests/pipelines/stable_diffusion/test_stable_diffusion_sag.py
View file @
90a624f6
...
...
@@ -136,7 +136,7 @@ class StableDiffusionPipelineIntegrationTests(unittest.TestCase):
assert
image
.
shape
==
(
1
,
512
,
512
,
3
)
expected_slice
=
np
.
array
([
0.1568
,
0.1738
,
0.1695
,
0.1693
,
0.1507
,
0.1705
,
0.1547
,
0.1751
,
0.1949
])
assert
np
.
abs
(
image_slice
.
flatten
()
-
expected_slice
).
max
()
<
5e-
4
assert
np
.
abs
(
image_slice
.
flatten
()
-
expected_slice
).
max
()
<
5e-
2
def
test_stable_diffusion_2
(
self
):
sag_pipe
=
StableDiffusionSAGPipeline
.
from_pretrained
(
"stabilityai/stable-diffusion-2-1-base"
)
...
...
@@ -156,4 +156,4 @@ class StableDiffusionPipelineIntegrationTests(unittest.TestCase):
assert
image
.
shape
==
(
1
,
512
,
512
,
3
)
expected_slice
=
np
.
array
([
0.3459
,
0.2876
,
0.2537
,
0.3002
,
0.2671
,
0.2160
,
0.3026
,
0.2262
,
0.2371
])
assert
np
.
abs
(
image_slice
.
flatten
()
-
expected_slice
).
max
()
<
5e-
5
assert
np
.
abs
(
image_slice
.
flatten
()
-
expected_slice
).
max
()
<
5e-
2
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