Spaces:
Sleeping
Sleeping
优化
Browse files
app.py
CHANGED
|
@@ -39,10 +39,17 @@ spk = None
|
|
| 39 |
debug = False
|
| 40 |
MODEL_REPO = 'Asankilp/gochiusa-sovits4.0'
|
| 41 |
MODEL_NAME = 'G_240000.pth'
|
|
|
|
| 42 |
CHECKPOINT_REPO = 'WitchHuntTV/checkpoint_best_legacy_500.pt'
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
class HParams():
|
| 47 |
def __init__(self, **kwargs):
|
| 48 |
for k, v in kwargs.items():
|
|
@@ -182,8 +189,8 @@ models_info = [
|
|
| 182 |
请问你今天要来点so-vits-svc 4.0模型吗?\n\n
|
| 183 |
* 模型尚处于半成品(
|
| 184 |
""",
|
| 185 |
-
"model_path":
|
| 186 |
-
"config_path":
|
| 187 |
}
|
| 188 |
]
|
| 189 |
|
|
|
|
| 39 |
debug = False
|
| 40 |
MODEL_REPO = 'Asankilp/gochiusa-sovits4.0'
|
| 41 |
MODEL_NAME = 'G_240000.pth'
|
| 42 |
+
DOWNLOAD_DIR = './downloaded'
|
| 43 |
CHECKPOINT_REPO = 'WitchHuntTV/checkpoint_best_legacy_500.pt'
|
| 44 |
+
if not os.path.exists(os.path.join(DOWNLOAD_DIR,MODEL_NAME):
|
| 45 |
+
print('下载模型文件...')
|
| 46 |
+
model_pth = hf_hub_download(repo_id=MODEL_REPO,filename=MODEL_NAME,local_dir=DOWNLOAD_DIR)
|
| 47 |
+
if not os.path.exists(os.path.join(DOWNLOAD_DIR,'config.json'):
|
| 48 |
+
print('下载配置文件...')
|
| 49 |
+
model_configfile = hf_hub_download(repo_id=MODEL_REPO,filename='config.json',local_dir=DOWNLOAD_DIR)
|
| 50 |
+
if not os.path.exists(os.path.join('./pretrain/checkpoint_best_legacy_500.pt'):
|
| 51 |
+
print('下载预训练模型文件...)
|
| 52 |
+
checkpoint_pt = hf_hub_download(repo_id=CHECKPOINT_REPO,filename='checkpoint_best_legacy_500.pt',local_dir='./pretrain')
|
| 53 |
class HParams():
|
| 54 |
def __init__(self, **kwargs):
|
| 55 |
for k, v in kwargs.items():
|
|
|
|
| 189 |
请问你今天要来点so-vits-svc 4.0模型吗?\n\n
|
| 190 |
* 模型尚处于半成品(
|
| 191 |
""",
|
| 192 |
+
"model_path": os.path.join(DOWNLOAD_DIR,MODEL_NAME),
|
| 193 |
+
"config_path": os.path.join(DOWNLOAD_DIR,'config.json'),
|
| 194 |
}
|
| 195 |
]
|
| 196 |
|