helloWorld199 commited on
Commit
0e2183d
·
verified ·
1 Parent(s): 24fc559

Update src/main.py

Browse files
Files changed (1) hide show
  1. src/main.py +7 -7
src/main.py CHANGED
@@ -181,11 +181,11 @@ def preprocess_song(song_input, mdx_model_params, song_id, is_webui, input_type,
181
  display_progress('[~] Separating Vocals from Instrumental...', 0.1, is_webui, progress)
182
  vocals_path, instrumentals_path = run_mdx(mdx_model_params, song_output_dir, os.path.join(mdxnet_models_dir, 'UVR-MDX-NET-Voc_FT.onnx'), orig_song_path, denoise=True, keep_orig=keep_orig, _stemname1 = "_origvocals", _stemname2="_originstr")
183
 
184
- #display_progress('[~] Separating Main Vocals from Backup Vocals...', 0.2, is_webui, progress)
185
- #backup_vocals_path, main_vocals_path = run_mdx(mdx_model_params, song_output_dir, os.path.join(mdxnet_models_dir, 'UVR_MDXNET_KARA_2.onnx'), vocals_path, suffix='Backup', invert_suffix='Main', denoise=True)
186
 
187
- #display_progress('[~] Applying DeReverb to Vocals...', 0.3, is_webui, progress)
188
- #_, main_vocals_dereverb_path = run_mdx(mdx_model_params, song_output_dir, os.path.join(mdxnet_models_dir, 'Reverb_HQ_By_FoxJoy.onnx'), main_vocals_path, invert_suffix='DeReverb', exclude_main=True, denoise=True)
189
 
190
  return orig_song_path, vocals_path, instrumentals_path, main_vocals_path, backup_vocals_path, main_vocals_dereverb_path
191
 
@@ -268,9 +268,9 @@ def song_cover_pipeline(song_input, voice_model, pitch_change, keep_files,
268
 
269
  if not os.path.exists(song_dir):
270
  os.makedirs(song_dir)
271
- orig_song_path, vocals_path, instrumentals_path= preprocess_song(song_input, mdx_model_params, song_id, is_webui, input_type, progress)
272
- print(vocals_path, instrumentals_path)
273
- return vocals_path, instrumentals_path
274
 
275
  else:
276
  vocals_path, main_vocals_path = None, None
 
181
  display_progress('[~] Separating Vocals from Instrumental...', 0.1, is_webui, progress)
182
  vocals_path, instrumentals_path = run_mdx(mdx_model_params, song_output_dir, os.path.join(mdxnet_models_dir, 'UVR-MDX-NET-Voc_FT.onnx'), orig_song_path, denoise=True, keep_orig=keep_orig, _stemname1 = "_origvocals", _stemname2="_originstr")
183
 
184
+ display_progress('[~] Separating Main Vocals from Backup Vocals...', 0.2, is_webui, progress)
185
+ backup_vocals_path, main_vocals_path = run_mdx(mdx_model_params, song_output_dir, os.path.join(mdxnet_models_dir, 'UVR_MDXNET_KARA_2.onnx'), vocals_path, suffix='Backup', invert_suffix='Main', denoise=True)
186
 
187
+ display_progress('[~] Applying DeReverb to Vocals...', 0.3, is_webui, progress)
188
+ _, main_vocals_dereverb_path = run_mdx(mdx_model_params, song_output_dir, os.path.join(mdxnet_models_dir, 'Reverb_HQ_By_FoxJoy.onnx'), main_vocals_path, invert_suffix='DeReverb', exclude_main=True, denoise=True)
189
 
190
  return orig_song_path, vocals_path, instrumentals_path, main_vocals_path, backup_vocals_path, main_vocals_dereverb_path
191
 
 
268
 
269
  if not os.path.exists(song_dir):
270
  os.makedirs(song_dir)
271
+ orig_song_path, vocals_path, instrumentals_path, backup_vocals_path, main_vocals_dereverb_path= preprocess_song(song_input, mdx_model_params, song_id, is_webui, input_type, progress)
272
+ print(vocals_path, instrumentals_path, backup_vocals_path, main_vocals_dereverb_path)
273
+ return vocals_path, instrumentals_path, backup_vocals_path, main_vocals_dereverb_path
274
 
275
  else:
276
  vocals_path, main_vocals_path = None, None