diff --git a/download-model.py b/download-model.py index d7cf9273..f4e1f607 100644 --- a/download-model.py +++ b/download-model.py @@ -262,7 +262,8 @@ class ModelDownloader: continue with open(output_folder / sha256[i][0], "rb") as f: - file_hash = hashlib.file_digest(f, "sha256").hexdigest() + bytes = f.read() + file_hash = hashlib.sha256(bytes).hexdigest() if file_hash != sha256[i][1]: print(f'Checksum failed: {sha256[i][0]} {sha256[i][1]}') validated = False