Create petreined_file.py
Browse files- petreined_file.py +34 -0
petreined_file.py
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import subprocess, shlex, os
|
2 |
+
|
3 |
+
|
4 |
+
assets_folder = "./assets/pretrained_v2/"
|
5 |
+
if not os.path.exists(assets_folder):
|
6 |
+
os.makedirs(assets_folder)
|
7 |
+
|
8 |
+
files = {
|
9 |
+
# Ov2 Super
|
10 |
+
"f0Ov2Super32kD.pth": "https://huggingface.co/ORVC/Ov2Super/resolve/main/f0Ov2Super32kD.pth",
|
11 |
+
"f0Ov2Super40kG.pth": "https://huggingface.co/ORVC/Ov2Super/resolve/main/f0Ov2Super40kG.pth",
|
12 |
+
|
13 |
+
# TITAN
|
14 |
+
"D-f040k-TITAN-Medium.pth": "https://huggingface.co/blaise-tk/TITAN/blob/main/models/medium/40k/pretrained/D-f040k-TITAN-Medium.pth",
|
15 |
+
"G-f032k-TITAN-Medium.pth": "https://huggingface.co/blaise-tk/TITAN/blob/main/models/medium/32k/pretrained/D-f032k-TITAN-Medium.pth",
|
16 |
+
|
17 |
+
|
18 |
+
# Snowie V3
|
19 |
+
"D_SnowieV3.1_40k.pth": "https://huggingface.co/MUSTAR/SnowieV3.1-40k/resolve/main/D_SnowieV3.1_40k.pth",
|
20 |
+
"G_SnowieV3.1_48k.pth": "https://huggingface.co/MUSTAR/SnowieV3.1-48k/resolve/main/G_SnowieV3.1_48k.pth",
|
21 |
+
|
22 |
+
# RIN E3
|
23 |
+
"RIN_E3_G.pth": "https://huggingface.co/MUSTAR/RIN_E3/resolve/main/RIN_E3_G.pth",
|
24 |
+
"RIN_E3_D.pth": "https://huggingface.co/MUSTAR/RIN_E3/resolve/main/RIN_E3_D.pth",
|
25 |
+
}
|
26 |
+
|
27 |
+
for file, link in files.items():
|
28 |
+
file_path = os.path.join(assets_folder, file)
|
29 |
+
if not os.path.exists(file_path):
|
30 |
+
try:
|
31 |
+
subprocess.run(['wget', link, '-O', file_path], check=True)
|
32 |
+
|
33 |
+
except subprocess.CalledProcessError as e:
|
34 |
+
print(f"Error downloading {file}: {e}")
|