Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -500,10 +500,11 @@ def change_choices():
|
|
| 500 |
|
| 501 |
|
| 502 |
def clean():
|
| 503 |
-
|
| 504 |
-
|
|
|
|
|
|
|
| 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 = {
|