Allow converting models from local directories (#1118)

This commit is contained in:
Remixer Dec 2024-11-25 04:41:06 +04:00 committed by GitHub
parent 0ffdb6dd20
commit adaab81029
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -174,11 +174,6 @@ def load_torch_weights_and_config(
"*.txt", "*.txt",
], ],
) )
else:
raise RuntimeError(
f"Model {name_or_path} is not found in {available_models()},"
"on Hugging Face or as a local path."
)
if name_or_path.endswith(".pt"): if name_or_path.endswith(".pt"):
checkpoint = torch.load(name_or_path, map_location="cpu", weights_only=False) checkpoint = torch.load(name_or_path, map_location="cpu", weights_only=False)