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
1994dbcb
"vscode:/vscode.git/clone" did not exist on "9f18f4c00627e1a0ad696b6774e5ad7ca8f4261c"
Unverified
Commit
1994dbcb
authored
Jun 05, 2023
by
Vladislav Lyubimov
Committed by
GitHub
Jun 05, 2023
Browse files
Fix from_ckpt not working properly on windows (#3666)
parent
262d539a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/diffusers/loaders.py
src/diffusers/loaders.py
+2
-2
No files found.
src/diffusers/loaders.py
View file @
1994dbcb
...
...
@@ -1447,8 +1447,8 @@ class FromCkptMixin:
ckpt_path
=
Path
(
pretrained_model_link_or_path
)
if
not
ckpt_path
.
is_file
():
# get repo_id and (potentially nested) file path of ckpt in repo
repo_id
=
str
(
Path
().
joinpath
(
*
ckpt_path
.
parts
[:
2
])
)
file_path
=
str
(
Path
().
joinpath
(
*
ckpt_path
.
parts
[
2
:])
)
repo_id
=
"/"
.
join
(
ckpt_path
.
parts
[:
2
])
file_path
=
"/"
.
join
(
ckpt_path
.
parts
[
2
:])
if
file_path
.
startswith
(
"blob/"
):
file_path
=
file_path
[
len
(
"blob/"
)
:]
...
...
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