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
chenpangpang
diffusers
Commits
219636f7
Commit
219636f7
authored
Jun 28, 2023
by
Patrick von Platen
Browse files
improve tolerance
parent
35bac5ed
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
tests/models/test_models_unet_3d_condition.py
tests/models/test_models_unet_3d_condition.py
+1
-1
No files found.
tests/models/test_models_unet_3d_condition.py
View file @
219636f7
...
@@ -296,7 +296,7 @@ class UNet3DConditionModelTests(ModelTesterMixin, UNetTesterMixin, unittest.Test
...
@@ -296,7 +296,7 @@ class UNet3DConditionModelTests(ModelTesterMixin, UNetTesterMixin, unittest.Test
with
torch
.
no_grad
():
with
torch
.
no_grad
():
new_sample
=
new_model
(
**
inputs_dict
,
cross_attention_kwargs
=
{
"scale"
:
0.5
}).
sample
new_sample
=
new_model
(
**
inputs_dict
,
cross_attention_kwargs
=
{
"scale"
:
0.5
}).
sample
assert
(
sample
-
new_sample
).
abs
().
max
()
<
3e-
4
assert
(
sample
-
new_sample
).
abs
().
max
()
<
3e-
3
# LoRA and no LoRA should NOT be the same
# LoRA and no LoRA should NOT be the same
assert
(
sample
-
old_sample
).
abs
().
max
()
>
1e-4
assert
(
sample
-
old_sample
).
abs
().
max
()
>
1e-4
...
...
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