diff --git a/torchchat/cli/download.py b/torchchat/cli/download.py index 14c19f943..0a912e014 100644 --- a/torchchat/cli/download.py +++ b/torchchat/cli/download.py @@ -149,6 +149,12 @@ def download_and_convert( model_config.distribution_channel == ModelDistributionChannel.HuggingFaceSnapshot ): + # Check if model is already downloaded in the old location + + if os.path.exists(models_dir / model_config.name): + print(f"Found model artifacts in {models_dir / model_config.name}. Downloading in Hugging Face cache...") + shutil.rmtree(models_dir / model_config.name) + _download_hf_snapshot(model_config, hf_token) return