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
f64d52db
Unverified
Commit
f64d52db
authored
Sep 12, 2023
by
Dhruv Nair
Committed by
GitHub
Sep 12, 2023
Browse files
fix custom diffusion tests (#4996)
parent
4d897aaf
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
tests/models/test_models_unet_2d_condition.py
tests/models/test_models_unet_2d_condition.py
+1
-1
No files found.
tests/models/test_models_unet_2d_condition.py
View file @
f64d52db
...
...
@@ -785,8 +785,8 @@ class UNet2DConditionModelTests(ModelTesterMixin, UNetTesterMixin, unittest.Test
self
.
assertTrue
(
os
.
path
.
isfile
(
os
.
path
.
join
(
tmpdirname
,
"pytorch_custom_diffusion_weights.bin"
)))
torch
.
manual_seed
(
0
)
new_model
=
self
.
model_class
(
**
init_dict
)
new_model
.
to
(
torch_device
)
new_model
.
load_attn_procs
(
tmpdirname
,
weight_name
=
"pytorch_custom_diffusion_weights.bin"
)
new_model
.
to
(
torch_device
)
with
torch
.
no_grad
():
new_sample
=
new_model
(
**
inputs_dict
).
sample
...
...
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