treat index as authoritative

This commit is contained in:
Sigbjørn Skjæret 2025-12-17 23:25:53 +01:00 committed by GitHub
parent a458664fc8
commit 077f1bdd8c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -217,7 +217,7 @@ class ModelBase:
if weight_map is None or not isinstance(weight_map, dict):
raise ValueError(f"Can't load 'weight_map' from {index_name!r}")
tensor_names_from_index.update(weight_map.keys())
part_dict: dict[str, None] = dict.fromkeys(list(weight_map.values()) + part_names, None)
part_dict: dict[str, None] = dict.fromkeys(weight_map.values(), None)
part_names = list(part_dict.keys())
else:
weight_map = {}