Aitron Emper commited on
Commit
037701f
1 Parent(s): b117731

Upload inference.py

Browse files
Files changed (1) hide show
  1. tabs/inference/inference.py +9 -5
tabs/inference/inference.py CHANGED
@@ -135,11 +135,7 @@ def match_index(model_file: str) -> tuple:
135
  base_model_name = model_file_name
136
 
137
  sid_directory = os.path.join(model_root_relative, base_model_name)
138
- double_sid_directory = os.path.join(sid_directory, base_model_name)
139
  directories_to_search = [sid_directory] if os.path.exists(sid_directory) else []
140
- directories_to_search += (
141
- [double_sid_directory] if os.path.exists(double_sid_directory) else []
142
- )
143
  directories_to_search.append(model_root_relative)
144
  matching_index_files = []
145
 
@@ -157,7 +153,8 @@ def match_index(model_file: str) -> tuple:
157
 
158
  if name_match or folder_match:
159
  index_path = os.path.join(directory, filename)
160
- if index_path in indexes_list:
 
161
  matching_index_files.append(
162
  (
163
  index_path,
@@ -354,6 +351,12 @@ def inference_tab():
354
  clear_outputs = gr.Button(
355
  i18n("Clear Outputs (Deletes all audios in assets/audios)")
356
  )
 
 
 
 
 
 
357
  pitch_batch = gr.Slider(
358
  minimum=-24,
359
  maximum=24,
@@ -463,6 +466,7 @@ def inference_tab():
463
  output_folder_batch,
464
  model_file,
465
  index_file,
 
466
  ],
467
  outputs=[vc_output3],
468
  )
 
135
  base_model_name = model_file_name
136
 
137
  sid_directory = os.path.join(model_root_relative, base_model_name)
 
138
  directories_to_search = [sid_directory] if os.path.exists(sid_directory) else []
 
 
 
139
  directories_to_search.append(model_root_relative)
140
  matching_index_files = []
141
 
 
153
 
154
  if name_match or folder_match:
155
  index_path = os.path.join(directory, filename)
156
+ updated_indexes_list = get_indexes()
157
+ if index_path in updated_indexes_list:
158
  matching_index_files.append(
159
  (
160
  index_path,
 
351
  clear_outputs = gr.Button(
352
  i18n("Clear Outputs (Deletes all audios in assets/audios)")
353
  )
354
+ split_audio_batch = gr.Checkbox(
355
+ label=i18n("Split Audio"),
356
+ visible=True,
357
+ value=False,
358
+ interactive=True,
359
+ )
360
  pitch_batch = gr.Slider(
361
  minimum=-24,
362
  maximum=24,
 
466
  output_folder_batch,
467
  model_file,
468
  index_file,
469
+ split_audio_batch,
470
  ],
471
  outputs=[vc_output3],
472
  )