Kaynağa Gözat

feat: 初始化transpose_weight_keys为默认空列表

zhch158_admin 1 ay önce
ebeveyn
işleme
ecbcce9cf1

+ 3 - 0
paddlex/inference/models/common/vlm/transformers/model_utils.py

@@ -1888,6 +1888,9 @@ class PretrainedModel(
         with ContextManagers(init_contexts):
             model = cls(config, *init_args, **model_kwargs)
 
+		# modified by zhch158
+        transpose_weight_keys = []  # ✅ 默认初始化
+
         if convert_from_torch and state_dict is None:
             if (
                 resolved_archive_file.endswith(PYTORCH_WEIGHTS_NAME)