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
e27500b7
Unverified
Commit
e27500b7
authored
Jul 17, 2023
by
Patrick von Platen
Committed by
GitHub
Jul 17, 2023
Browse files
[From ckpt] replace with os path join (#3746)
replace with os path join
parent
fe5911bf
Changes
1
Hide 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 @
e27500b7
...
@@ -1476,8 +1476,8 @@ class FromSingleFileMixin:
...
@@ -1476,8 +1476,8 @@ class FromSingleFileMixin:
ckpt_path
=
Path
(
pretrained_model_link_or_path
)
ckpt_path
=
Path
(
pretrained_model_link_or_path
)
if
not
ckpt_path
.
is_file
():
if
not
ckpt_path
.
is_file
():
# get repo_id and (potentially nested) file path of ckpt in repo
# get repo_id and (potentially nested) file path of ckpt in repo
repo_id
=
"/"
.
join
(
ckpt_path
.
parts
[:
2
])
repo_id
=
os
.
path
.
join
(
*
ckpt_path
.
parts
[:
2
])
file_path
=
"/"
.
join
(
ckpt_path
.
parts
[
2
:])
file_path
=
os
.
path
.
join
(
*
ckpt_path
.
parts
[
2
:])
if
file_path
.
startswith
(
"blob/"
):
if
file_path
.
startswith
(
"blob/"
):
file_path
=
file_path
[
len
(
"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