Allow converting models from local directories

This commit is contained in:
Remixer Dec 2024-11-24 22:46:36 +04:00 committed by GitHub
parent 0f135396ae
commit 72f1a651e2
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",
],
)
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"):
checkpoint = torch.load(name_or_path, map_location="cpu", weights_only=False)