浏览代码

creating HFShardDownloader with quick_check true so it doesnt start downloading models

cadenmackenzie 9 月之前
父节点
当前提交
649157d408
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      exo/api/chatgpt_api.py

+ 2 - 1
exo/api/chatgpt_api.py

@@ -223,7 +223,8 @@ class ChatGPTAPI:
                 if all(map(lambda engine: engine in model_info["repo"], required_engines)):
                     shard = build_base_shard(model_name, self.inference_engine_classname)
                     if shard:
-                        downloader = HFShardDownloader()
+                        # Use HFShardDownloader to check status without initiating download
+                        downloader = HFShardDownloader(quick_check=True)  # quick_check=True prevents downloads
                         downloader.current_shard = shard
                         downloader.current_repo_id = get_repo(shard.model_id, self.inference_engine_classname)
                         status = await downloader.get_shard_download_status()