mirror of
https://github.com/huggingface/diffusers.git
synced 2026-01-29 07:22:12 +03:00
Fix from_ckpt not working properly on windows (#3666)
This commit is contained in:
committed by
GitHub
parent
262d539a8a
commit
1994dbcb5e
@@ -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/") :]
|
||||
|
||||
Reference in New Issue
Block a user