mirror of
https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI.git
synced 2025-05-06 20:01:37 +08:00
feat(gui): add assets checking
This commit is contained in:
parent
5266fd1b71
commit
aa3908062f
14
gui_v1.py
14
gui_v1.py
@ -142,8 +142,22 @@ if __name__ == "__main__":
|
||||
self.input_devices_indices = None
|
||||
self.output_devices_indices = None
|
||||
self.stream = None
|
||||
if not self.config.nocheck: self.check_assets()
|
||||
self.update_devices()
|
||||
self.launcher()
|
||||
|
||||
def check_assets(self):
|
||||
global now_dir
|
||||
from infer.lib.rvcmd import check_all_assets, download_all_assets
|
||||
|
||||
tmp = os.path.join(now_dir, "TEMP")
|
||||
shutil.rmtree(tmp, ignore_errors=True)
|
||||
os.makedirs(tmp, exist_ok=True)
|
||||
if not check_all_assets():
|
||||
download_all_assets(tmpdir=tmp)
|
||||
if not check_all_assets():
|
||||
printt("counld not satisfy all assets needed.")
|
||||
exit(1)
|
||||
|
||||
def load(self):
|
||||
try:
|
||||
|
Loading…
x
Reference in New Issue
Block a user