fix version issue of transformers (#1412)

This commit is contained in:
Zhongjie Duan
2026-04-24 17:01:08 +08:00
committed by GitHub
parent b1af4af8a9
commit 5b66f223b6
4 changed files with 15 additions and 5 deletions

View File

@@ -0,0 +1,9 @@
def DINOv3StateDictConverter(state_dict):
new_state_dict = {}
for key in state_dict:
value = state_dict[key]
if key.startswith("layer"):
new_state_dict["model." + key] = value
else:
new_state_dict[key] = value
return new_state_dict