kevinwang676 commited on
Commit
9020641
1 Parent(s): f0cf1e2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -376,7 +376,7 @@ def load_hubert():
376
  hubert_model.load_state_dict(state_dict['model'])
377
 
378
  # Move the model to the desired device
379
- hubert_model = hubert_model.to("cpu")
380
 
381
  # Set the model to half precision if required
382
  if config.is_half:
@@ -387,7 +387,7 @@ def load_hubert():
387
  # Set the model to evaluation mode
388
  hubert_model.eval()
389
 
390
- load_hubert()
391
 
392
  def rvc_models(model_name):
393
  global vc, net_g, index_files, tgt_sr, version
@@ -467,7 +467,7 @@ def infer_gpu(hubert_model, net_g, audio, f0_up_key, index_file, tgt_sr, version
467
  )
468
 
469
  def rvc_infer_music(url, model_name, song_name, split_model, f0_up_key, vocal_volume, inst_volume):
470
- #load_hubert()
471
  #print(hubert_model)
472
  url = url.strip().replace(" ", "")
473
  model_name = model_name.strip().replace(" ", "")
 
376
  hubert_model.load_state_dict(state_dict['model'])
377
 
378
  # Move the model to the desired device
379
+ hubert_model = hubert_model.to("cuda:0")
380
 
381
  # Set the model to half precision if required
382
  if config.is_half:
 
387
  # Set the model to evaluation mode
388
  hubert_model.eval()
389
 
390
+ #load_hubert()
391
 
392
  def rvc_models(model_name):
393
  global vc, net_g, index_files, tgt_sr, version
 
467
  )
468
 
469
  def rvc_infer_music(url, model_name, song_name, split_model, f0_up_key, vocal_volume, inst_volume):
470
+ load_hubert()
471
  #print(hubert_model)
472
  url = url.strip().replace(" ", "")
473
  model_name = model_name.strip().replace(" ", "")