From d1382f232cd25d7824e78a4048ec1d7bf06e3f17 Mon Sep 17 00:00:00 2001 From: Lincoln Stein Date: Mon, 18 Sep 2023 19:38:33 -0700 Subject: [PATCH] fasthash produces same results on windows & linux --- invokeai/backend/model_manager/hash.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/invokeai/backend/model_manager/hash.py b/invokeai/backend/model_manager/hash.py index 98359f1fdd..1af4bceeba 100644 --- a/invokeai/backend/model_manager/hash.py +++ b/invokeai/backend/model_manager/hash.py @@ -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)