fix too relaxed model glob (breaking multifile)
This commit is contained in:
parent
b59c371035
commit
2b7cf9f32b
1 changed files with 6 additions and 1 deletions
|
@ -1039,7 +1039,12 @@ def load_some_model(path: Path) -> ModelPlus:
|
|||
'''Load a model of any supported format.'''
|
||||
# Be extra-friendly and accept either a file or a directory:
|
||||
if path.is_dir():
|
||||
globs = ["consolidated.00.pth", "pytorch_model*.bin", "*.pt"]
|
||||
globs = [
|
||||
"consolidated.00.pth",
|
||||
"pytorch_model.bin",
|
||||
"pytorch_model-00001-of-*.bin",
|
||||
"*.pt"
|
||||
]
|
||||
files = [file for glob in globs for file in path.glob(glob)]
|
||||
if not files:
|
||||
# Try GGML too, but with lower priority, since if both a non-GGML
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue