File size: 638 Bytes
20cf96a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
from huggingface_hub import snapshot_download

# List of model IDs
model_id_list = [
    "Idiap/EdgeFace-Base",
    "Idiap/EdgeFace-XS-GAMMA",
    "Idiap/EdgeFace-XXS",
    "Idiap/EdgeFace-S-GAMMA"
]

# Directory to save the models
cache_dir = "./checkpoints"

# Download each model to the specified cache directory
for model_id in model_id_list:
    try:
        print(f"Downloading {model_id}...")
        snapshot_download(repo_id=model_id, local_dir=cache_dir)
        print(f"Successfully downloaded {model_id} to {cache_dir}")
    except Exception as e:
        print(f"Error downloading {model_id}: {str(e)}")