fasthash produces same results on windows & linux

This commit is contained in:
Lincoln Stein
2023-09-18 19:38:33 -07:00
parent 151ba02022
commit d1382f232c

View File

@ -54,9 +54,8 @@ class FastModelHash(object):
for root, dirs, files in os.walk(model_location):
for file in files:
# Ignore the config files, which change locally,
# and just look at the bin files.
if file in ["config.json", "model_index.json"]:
# only tally tensor files
if not file.endswith(('.ckpt', '.safetensors', '.bin', '.pt', '.pth')):
continue
path = Path(root) / file
fast_hash = cls._hash_file(path)