mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Testing different file chunk sizes
This commit is contained in:
parent
bb3f1b9ca6
commit
3bb50926af
@ -166,7 +166,7 @@ class ModelHash:
|
||||
"""Hashes a file using a hashlib algorithm."""
|
||||
hasher = hashlib.new(algorithm)
|
||||
with open(file_path, "rb") as f:
|
||||
for chunk in iter(lambda: f.read(128 * 1024), b""):
|
||||
for chunk in iter(lambda: f.read(8 * 1024), b""):
|
||||
hasher.update(chunk)
|
||||
return hasher.hexdigest()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user