convert-hf : sort model part names
`os.listdir` is said to list files in arbitrary order. Sorting the file names should let "model-00009-of-00042.safetensors" be loaded before "model-00010-of-00042.safetensors".
This commit is contained in:
parent
639b374b1a
commit
644c2696d0
1 changed files with 2 additions and 0 deletions
|
@ -243,6 +243,8 @@ class Model(Protocol):
|
|||
if filename.endswith(suffix):
|
||||
part_names.append(filename)
|
||||
|
||||
part_names.sort()
|
||||
|
||||
return part_names
|
||||
|
||||
@staticmethod
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue