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
d8ce53a8
Unverified
Commit
d8ce53a8
authored
May 26, 2023
by
Emin Demirci
Committed by
GitHub
May 26, 2023
Browse files
Fix loaded_token reference before definition (#3523)
parent
d114d80f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
0 deletions
+1
-0
src/diffusers/loaders.py
src/diffusers/loaders.py
+1
-0
No files found.
src/diffusers/loaders.py
View file @
d8ce53a8
...
...
@@ -682,6 +682,7 @@ class TextualInversionLoaderMixin:
state_dict
=
torch
.
load
(
model_file
,
map_location
=
"cpu"
)
# 2. Load token and embedding correcly from file
loaded_token
=
None
if
isinstance
(
state_dict
,
torch
.
Tensor
):
if
token
is
None
:
raise
ValueError
(
...
...
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