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
OpenDAS
diffusers
Commits
125d7830
Unverified
Commit
125d7830
authored
Jan 29, 2023
by
Ayan Das
Committed by
GitHub
Jan 29, 2023
Browse files
fix typo in EMAModel's load_state_dict() (#2151)
Possible typo introduced in
7c82a16f
parent
fdf70cb5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/diffusers/training_utils.py
src/diffusers/training_utils.py
+1
-1
No files found.
src/diffusers/training_utils.py
View file @
125d7830
...
@@ -253,7 +253,7 @@ class EMAModel:
...
@@ -253,7 +253,7 @@ class EMAModel:
if
not
isinstance
(
self
.
inv_gamma
,
(
float
,
int
)):
if
not
isinstance
(
self
.
inv_gamma
,
(
float
,
int
)):
raise
ValueError
(
"Invalid inv_gamma"
)
raise
ValueError
(
"Invalid inv_gamma"
)
self
.
power
=
state_dict
[
"power"
]
.
get
(
"power"
,
self
.
power
)
self
.
power
=
state_dict
.
get
(
"power"
,
self
.
power
)
if
not
isinstance
(
self
.
power
,
(
float
,
int
)):
if
not
isinstance
(
self
.
power
,
(
float
,
int
)):
raise
ValueError
(
"Invalid power"
)
raise
ValueError
(
"Invalid power"
)
...
...
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