File size: 507 Bytes
50ff874
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
from huggingface_hub import snapshot_download
import os

target = "pretrained_models"
os.makedirs(target, exist_ok=True)

# Download speech encoders and Chinese frontends (kept small; add more as needed)
try:
    snapshot_download(
        repo_id="lj1995/GPT-SoVITS",
        repo_type="model",
        local_dir=target,
        allow_patterns=["sv/*", "chinese*"],
    )
    print("Support models downloaded to ./pretrained_models")
except Exception as e:
    print("Skipping support model download:", e)