diff options
author | Vladimir Mandic <mandic00@live.com> | 2023-01-15 14:42:34 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-15 14:42:34 +0000 |
commit | f0312565e5b4d56a421af889a9a8eaea0ba92959 (patch) | |
tree | 17c45f64c843ac1ddf54b95a0c39ea887090d765 /modules/hashes.py | |
parent | ebfdd7baeb660ec66f78e1a0e5e45442025f262d (diff) | |
download | stable-diffusion-webui-gfx803-f0312565e5b4d56a421af889a9a8eaea0ba92959.tar.gz stable-diffusion-webui-gfx803-f0312565e5b4d56a421af889a9a8eaea0ba92959.tar.bz2 stable-diffusion-webui-gfx803-f0312565e5b4d56a421af889a9a8eaea0ba92959.zip |
increase block size
Diffstat (limited to 'modules/hashes.py')
-rw-r--r-- | modules/hashes.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/hashes.py b/modules/hashes.py index 14231771..b85a7580 100644 --- a/modules/hashes.py +++ b/modules/hashes.py @@ -34,9 +34,10 @@ def cache(subsection): def calculate_sha256(filename):
hash_sha256 = hashlib.sha256()
+ blksize = 1024 * 1024
with open(filename, "rb") as f:
- for chunk in iter(lambda: f.read(4096), b""):
+ for chunk in iter(lambda: f.read(blksize), b""):
hash_sha256.update(chunk)
return hash_sha256.hexdigest()
|