mirror of
https://github.com/storytold/storyteller-ml.git
synced 2026-10-18 00:33:15 +00:00
7d5fd4f029
* init seed-vc * seed-vc workflow * put seed-vc in the right dir
34 lines
761 B
Python
34 lines
761 B
Python
import os
|
|
|
|
from huggingface_hub import hf_hub_download
|
|
|
|
|
|
def check_and_download_files(
|
|
repo_id: str,
|
|
local_dir: str,
|
|
file_list: list[str],
|
|
) -> None:
|
|
os.makedirs(local_dir, exist_ok=True)
|
|
for file in file_list:
|
|
file_path = os.path.join(local_dir, file)
|
|
if not os.path.exists(file_path):
|
|
hf_hub_download(
|
|
repo_id=repo_id,
|
|
filename=file,
|
|
local_dir=local_dir,
|
|
)
|
|
|
|
|
|
repo_id = "Plachta/Seed-VC"
|
|
local_dir = "./checkpoints"
|
|
files = [
|
|
"DiT_step_315000_seed_v2_online_pruned.pth",
|
|
"README.md",
|
|
"config_dit_mel_seed_wavenet.yml",
|
|
"hifigan.yml",
|
|
"hift.pt",
|
|
"speech_tokenizer_v1.onnx",
|
|
]
|
|
|
|
check_and_download_files(repo_id, local_dir, files)
|