mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-21 21:22:11 -03:00
Remove duplicate hash entries with a single path in get_duplicate_hashes method
This commit is contained in:
@@ -220,6 +220,15 @@ class ModelHashIndex:
|
||||
|
||||
def get_duplicate_hashes(self) -> Dict[str, List[str]]:
|
||||
"""Get dictionary of duplicate hashes and their paths"""
|
||||
# Remove entries that have only one path
|
||||
hashes_to_remove = []
|
||||
for sha256, paths in self._duplicate_hashes.items():
|
||||
if len(paths) <= 1:
|
||||
hashes_to_remove.append(sha256)
|
||||
|
||||
for sha256 in hashes_to_remove:
|
||||
del self._duplicate_hashes[sha256]
|
||||
|
||||
return self._duplicate_hashes
|
||||
|
||||
def get_duplicate_filenames(self) -> Dict[str, List[str]]:
|
||||
|
||||
Reference in New Issue
Block a user