浏览代码

fix allow patterns

Alex Cheema 7 月之前
父节点
当前提交
7dd7fe4977
共有 1 个文件被更改,包括 2 次插入4 次删除
  1. 2 4
      exo/download/hf/hf_helpers.py

+ 2 - 4
exo/download/hf/hf_helpers.py

@@ -404,8 +404,6 @@ def get_allow_patterns(weight_map: Dict[str, str], shard: Shard) -> List[str]:
     elif shard.is_last_layer():
       shard_specific_patterns.add(sorted_file_names[-1])
   else:
-    shard_specific_patterns = ["*.safetensors"]
+    shard_specific_patterns = set("*.safetensors")
   if DEBUG >= 2: print(f"get_allow_patterns {weight_map=} {shard=} {shard_specific_patterns=}")
-  allowed_patterns = list(default_patterns)
-  allowed_patterns.extend(shard_specific_patterns)
-  return list(set(allowed_patterns))
+  return list(default_patterns | shard_specific_patterns)