hf_down.py 651 Bytes
Newer Older
chenpangpang's avatar
chenpangpang committed
1
2
3
4
5
6
7
8
9
10
# pip install huggingface-cli
import os

os.system("pip install -U huggingface-hub")

os.environ['HF_ENDPOINT'] = 'https://hf-mirror.com'
from huggingface_hub import hf_hub_download, snapshot_download

hf_hub_download(repo_id="ai-forever/Real-ESRGAN", filename="RealESRGAN_x4.pth", local_dir="model_real_esran")
snapshot_download(repo_id="AlexWortega/RIFE", local_dir="model_rife")
chenpangpang's avatar
chenpangpang committed
11
12
13
14
15
16
17
18
19
20

os.environ['HF_ENDPOINT'] = 'https://hf-mirror.com'

model_list = [
    "THUDM/CogVideoX-5b"
]

for model_path in model_list:
    os.system(
        f"huggingface-cli download --resume-download  {model_path} --local-dir ./{model_path} --local-dir-use-symlinks False")