kevinwang676 commited on
Commit
d0ad0f3
·
verified ·
1 Parent(s): 0d2bae6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -219,7 +219,7 @@ pre_fun_hp5 = func(
219
  # Separate vocals
220
 
221
  # GPU needed
222
- @spaces.GPU(duration=120)
223
  def get_vocal_gpu(audio_path, split_model, filename):
224
  if split_model=="UVR-HP2":
225
  pre_fun = pre_fun_hp2
@@ -349,6 +349,7 @@ def combine_vocal_and_inst(model_name, song_name, song_id, split_model, cover_so
349
  print(result.stdout.decode())
350
  return output_path
351
 
 
352
 
353
  @spaces.GPU()
354
  def load_hubert():
@@ -369,6 +370,7 @@ def load_hubert():
369
 
370
  print("0.开始加载Hubert")
371
  load_hubert()
 
372
 
373
  def rvc_models(model_name):
374
  global vc, net_g, index_files, tgt_sr, version
@@ -447,7 +449,7 @@ def infer_gpu(hubert_model, net_g, audio, f0_up_key, index_file, tgt_sr, version
447
  )
448
 
449
  def rvc_infer_music(url, model_name, song_name, split_model, f0_up_key, vocal_volume, inst_volume):
450
- load_hubert()
451
  url = url.strip().replace(" ", "")
452
  model_name = model_name.strip().replace(" ", "")
453
  if url.startswith('https://download.openxlab.org.cn/models/'):
 
219
  # Separate vocals
220
 
221
  # GPU needed
222
+ @spaces.GPU(duration=200)
223
  def get_vocal_gpu(audio_path, split_model, filename):
224
  if split_model=="UVR-HP2":
225
  pre_fun = pre_fun_hp2
 
349
  print(result.stdout.decode())
350
  return output_path
351
 
352
+ global hubert_model
353
 
354
  @spaces.GPU()
355
  def load_hubert():
 
370
 
371
  print("0.开始加载Hubert")
372
  load_hubert()
373
+ print(hubert_model)
374
 
375
  def rvc_models(model_name):
376
  global vc, net_g, index_files, tgt_sr, version
 
449
  )
450
 
451
  def rvc_infer_music(url, model_name, song_name, split_model, f0_up_key, vocal_volume, inst_volume):
452
+ #load_hubert()
453
  url = url.strip().replace(" ", "")
454
  model_name = model_name.strip().replace(" ", "")
455
  if url.startswith('https://download.openxlab.org.cn/models/'):