increase sha256 chunksize when calculating model hash

- Thanks to @abdBarho, who discovered that increasing the chunksize
  dramatically decreases the amount of time to calculate the hash.
This commit is contained in:
Lincoln Stein
2023-04-09 16:39:16 -04:00
parent 2af511c98a
commit 66364501d5

View File

@@ -1162,7 +1162,7 @@ class ModelManager(object):
return self.device.type == "cuda"
def _diffuser_sha256(
self, name_or_path: Union[str, Path], chunksize=4096
self, name_or_path: Union[str, Path], chunksize=16777216
) -> Union[str, bytes]:
path = None
if isinstance(name_or_path, Path):