Skip to content
This repository was archived by the owner on Sep 10, 2025. It is now read-only.

Commit 27e08e3

Browse files
author
vmpuri
committed
Delete models from old location for huggingface download
1 parent a4aaccf commit 27e08e3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

torchchat/cli/download.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,13 @@ def download_and_convert(
149149
model_config.distribution_channel
150150
== ModelDistributionChannel.HuggingFaceSnapshot
151151
):
152+
# Check if model is already downloaded in the old location
153+
154+
if os.path.exists(models_dir / model_config.name):
155+
print("Found old model artifacts. Downloading in Hugging Face cache...")
156+
os.rmtree(models_dir / model_config.name)
157+
158+
152159
_download_hf_snapshot(model_config, hf_token)
153160
return
154161

0 commit comments

Comments
 (0)