Skip to content

Commit c0eb1a9

Browse files
authored
increase sha256 chunksize when calculating model hash (#3162)
- Thanks to @AbdBarho, who discovered that increasing the chunksize dramatically decreases the amount of time to calculate the hash.
2 parents 994a76a + ce6629b commit c0eb1a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ldm/invoke/model_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1156,7 +1156,7 @@ def _has_cuda(self) -> bool:
11561156
return self.device.type == "cuda"
11571157

11581158
def _diffuser_sha256(
1159-
self, name_or_path: Union[str, Path], chunksize=4096
1159+
self, name_or_path: Union[str, Path], chunksize=16777216
11601160
) -> Union[str, bytes]:
11611161
path = None
11621162
if isinstance(name_or_path, Path):

0 commit comments

Comments
 (0)