Skip to content

Commit 1994dbc

Browse files
Fix from_ckpt not working properly on windows (#3666)
1 parent 262d539 commit 1994dbc

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
@@ -1447,8 +1447,8 @@ def from_ckpt(cls, pretrained_model_link_or_path, **kwargs):
14471447
ckpt_path = Path(pretrained_model_link_or_path)
14481448
if not ckpt_path.is_file():
14491449
# get repo_id and (potentially nested) file path of ckpt in repo
1450-
repo_id = str(Path().joinpath(*ckpt_path.parts[:2]))
1451-
file_path = str(Path().joinpath(*ckpt_path.parts[2:]))
1450+
repo_id = "/".join(ckpt_path.parts[:2])
1451+
file_path = "/".join(ckpt_path.parts[2:])
14521452

14531453
if file_path.startswith("blob/"):
14541454
file_path = file_path[len("blob/") :]

0 commit comments

Comments
 (0)