Baseta commited on
Commit
63f30b2
·
verified ·
1 Parent(s): fb00b7e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -500,10 +500,11 @@ def change_choices():
500
 
501
 
502
  def clean():
503
- print("clean_empty_cache")
504
- del net_g, n_spk, vc, hubert_model, tgt_sr # ,cpt
 
 
505
  return {"value": "", "__type__": "update"}
506
-
507
 
508
 
509
  sr_dict = {
 
500
 
501
 
502
  def clean():
503
+ if hubert_model != None: # 考虑到轮询, 需要加个判断看是否 sid 是由有模型切换到无模型的
504
+ print("clean_empty_cache")
505
+ del net_g, n_spk, vc, hubert_model, tgt_sr # ,cpt
506
+ hubert_model = net_g = n_spk = vc = hubert_model = tgt_sr = None
507
  return {"value": "", "__type__": "update"}
 
508
 
509
 
510
  sr_dict = {