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
e05f03ae
Unverified
Commit
e05f03ae
authored
Jul 28, 2022
by
Anton Lozhkov
Committed by
GitHub
Jul 28, 2022
Browse files
Disable test_ddpm_ddim_equality_batched until resolved (#142)
disable test_ddpm_ddim_equality_batched
parent
6c15636b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
tests/test_modeling_utils.py
tests/test_modeling_utils.py
+5
-5
No files found.
tests/test_modeling_utils.py
View file @
e05f03ae
...
...
@@ -894,10 +894,10 @@ class PipelineTesterMixin(unittest.TestCase):
generator
=
torch
.
manual_seed
(
0
)
ddim_image
=
ddim
(
generator
=
generator
,
num_inference_steps
=
1000
,
eta
=
1.0
,
output_type
=
"numpy"
)[
"sample"
]
# the values aren't exactly equal, but the images look the same
upon
visual
inspection
# the values aren't exactly equal, but the images look the same visual
ly
assert
np
.
abs
(
ddpm_image
-
ddim_image
).
max
()
<
1e-1
@
slow
@
unittest
.
skip
(
"(Anton) The test is failing for large batch sizes, needs investigation"
)
def
test_ddpm_ddim_equality_batched
(
self
):
model_id
=
"google/ddpm-cifar10-32"
...
...
@@ -909,12 +909,12 @@ class PipelineTesterMixin(unittest.TestCase):
ddim
=
DDIMPipeline
(
unet
=
unet
,
scheduler
=
ddim_scheduler
)
generator
=
torch
.
manual_seed
(
0
)
ddpm_images
=
ddpm
(
batch_size
=
2
,
generator
=
generator
,
output_type
=
"numpy"
)[
"sample"
]
ddpm_images
=
ddpm
(
batch_size
=
4
,
generator
=
generator
,
output_type
=
"numpy"
)[
"sample"
]
generator
=
torch
.
manual_seed
(
0
)
ddim_images
=
ddim
(
batch_size
=
2
,
generator
=
generator
,
num_inference_steps
=
1000
,
eta
=
1.0
,
output_type
=
"numpy"
)[
ddim_images
=
ddim
(
batch_size
=
4
,
generator
=
generator
,
num_inference_steps
=
1000
,
eta
=
1.0
,
output_type
=
"numpy"
)[
"sample"
]
# the values aren't exactly equal, but the images look the same
upon
visual
inspection
# the values aren't exactly equal, but the images look the same visual
ly
assert
np
.
abs
(
ddpm_images
-
ddim_images
).
max
()
<
1e-1
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