fix(model-hash-index): clean up AutoV2 entry in remove_by_hash

This commit is contained in:
Will Miao
2026-05-27 19:38:08 +08:00
parent 7027a7c270
commit d2a04f8993

View File

@@ -186,6 +186,10 @@ class ModelHashIndex:
# Remove hash-to-path mapping
del self._hash_to_path[sha256]
autov2_key = sha256[:10]
if autov2_key in self._autov2_to_path:
del self._autov2_to_path[autov2_key]
# Update filename-to-hash and duplicate filenames for all paths
for path_to_remove in paths_to_remove:
fname = self._get_filename_from_path(path_to_remove)