Skip to content

Commit e27500b

Browse files
[From ckpt] replace with os path join (huggingface#3746)
replace with os path join
1 parent fe5911b commit e27500b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/diffusers/loaders.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1476,8 +1476,8 @@ def from_single_file(cls, pretrained_model_link_or_path, **kwargs):
14761476
ckpt_path = Path(pretrained_model_link_or_path)
14771477
if not ckpt_path.is_file():
14781478
# get repo_id and (potentially nested) file path of ckpt in repo
1479-
repo_id = "/".join(ckpt_path.parts[:2])
1480-
file_path = "/".join(ckpt_path.parts[2:])
1479+
repo_id = os.path.join(*ckpt_path.parts[:2])
1480+
file_path = os.path.join(*ckpt_path.parts[2:])
14811481

14821482
if file_path.startswith("blob/"):
14831483
file_path = file_path[len("blob/") :]

0 commit comments

Comments
 (0)