"vscode:/vscode.git/clone" did not exist on "9f18f4c00627e1a0ad696b6774e5ad7ca8f4261c"
Unverified Commit 1994dbcb authored by Vladislav Lyubimov's avatar Vladislav Lyubimov Committed by GitHub
Browse files

Fix from_ckpt not working properly on windows (#3666)

parent 262d539a
......@@ -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/") :]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment