Spaces:
Running
on
Zero
Running
on
Zero
Update src/main.py
Browse files- src/main.py +10 -0
src/main.py
CHANGED
@@ -92,7 +92,17 @@ def raise_exception(error_msg, is_webui):
|
|
92 |
def get_rvc_model(voice_model, is_webui):
|
93 |
rvc_model_filename, rvc_index_filename = None, None
|
94 |
model_dir = os.path.join(rvc_models_dir, voice_model)
|
|
|
95 |
for file in os.listdir(model_dir):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
ext = os.path.splitext(file)[1]
|
97 |
if ext == '.pth':
|
98 |
rvc_model_filename = file
|
|
|
92 |
def get_rvc_model(voice_model, is_webui):
|
93 |
rvc_model_filename, rvc_index_filename = None, None
|
94 |
model_dir = os.path.join(rvc_models_dir, voice_model)
|
95 |
+
print(model_dir)
|
96 |
for file in os.listdir(model_dir):
|
97 |
+
print(file)
|
98 |
+
if os.path.isdir(file):
|
99 |
+
for ff in os.listdir(file):
|
100 |
+
print("subfile", ff)
|
101 |
+
ext = os.path.splitext(ff)[1]
|
102 |
+
if ext == '.pth':
|
103 |
+
rvc_model_filename = ff
|
104 |
+
if ext == '.index':
|
105 |
+
rvc_index_filename = ff
|
106 |
ext = os.path.splitext(file)[1]
|
107 |
if ext == '.pth':
|
108 |
rvc_model_filename = file
|