Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
manual model download
Browse files- README.md +1 -1
- app.py +4 -4
- resources/app/python/models_manager.py +2 -1
README.md
CHANGED
@@ -20,4 +20,4 @@ preload_from_hub:
|
|
20 |
license: gpl-3.0
|
21 |
---
|
22 |
|
23 |
-
|
|
|
20 |
license: gpl-3.0
|
21 |
---
|
22 |
|
23 |
+
DanRuta's xVASynth, GitHub repo: [https://github.com/DanRuta/xVA-Synth](https://github.com/DanRuta/xVA-Synth)
|
app.py
CHANGED
@@ -36,10 +36,10 @@ def run_xvaserver():
|
|
36 |
|
37 |
def load_model():
|
38 |
model_name = "Pendrokar/TorchMoji"
|
39 |
-
|
40 |
-
|
41 |
-
model_path = '/tmp/hfcache/models--Pendrokar--xvapitch_nvidia_6670/snapshots/2e138a7c459fb1cb1182dd7bc66813f5325d30fd/ccby_nvidia_hifi_6670_M.pt'
|
42 |
-
model_json_path = '/tmp/hfcache/models--Pendrokar--xvapitch_nvidia_6670/snapshots/2e138a7c459fb1cb1182dd7bc66813f5325d30fd/ccby_nvidia_hifi_6670_M.json'
|
43 |
# try:
|
44 |
# os.symlink(model_path, os.path.join('./models/ccby/', os.path.basename(model_path)))
|
45 |
# os.symlink(model_json_path, os.path.join('./models/ccby/', os.path.basename(model_json_path)))
|
|
|
36 |
|
37 |
def load_model():
|
38 |
model_name = "Pendrokar/TorchMoji"
|
39 |
+
model_path = hf_hub_download(repo_id=model_name, filename="ccby_nvidia_hifi_6670_M.pt")
|
40 |
+
model_json_path = hf_hub_download(repo_id=model_name, filename="ccby_nvidia_hifi_6670_M.json")
|
41 |
+
# model_path = '/tmp/hfcache/models--Pendrokar--xvapitch_nvidia_6670/snapshots/2e138a7c459fb1cb1182dd7bc66813f5325d30fd/ccby_nvidia_hifi_6670_M.pt'
|
42 |
+
# model_json_path = '/tmp/hfcache/models--Pendrokar--xvapitch_nvidia_6670/snapshots/2e138a7c459fb1cb1182dd7bc66813f5325d30fd/ccby_nvidia_hifi_6670_M.json'
|
43 |
# try:
|
44 |
# os.symlink(model_path, os.path.join('./models/ccby/', os.path.basename(model_path)))
|
45 |
# os.symlink(model_json_path, os.path.join('./models/ccby/', os.path.basename(model_json_path)))
|
resources/app/python/models_manager.py
CHANGED
@@ -111,7 +111,8 @@ class ModelsManager(object):
|
|
111 |
self.init_model(model_key, instance_index)
|
112 |
|
113 |
if not os.path.exists(ckpt_path):
|
114 |
-
|
|
|
115 |
|
116 |
if self.models_bank[model_key][instance_index].ckpt_path != ckpt_path:
|
117 |
self.logger.info(f'ModelsManager: Loading model checkpoint: {model_key}, {ckpt_path}')
|
|
|
111 |
self.init_model(model_key, instance_index)
|
112 |
|
113 |
if not os.path.exists(ckpt_path):
|
114 |
+
self.logger.error('Checkpoint not found!')
|
115 |
+
raise FileNotFoundError()
|
116 |
|
117 |
if self.models_bank[model_key][instance_index].ckpt_path != ckpt_path:
|
118 |
self.logger.info(f'ModelsManager: Loading model checkpoint: {model_key}, {ckpt_path}')
|