Spaces:
Configuration error
Configuration error
unknown
commited on
Commit
·
199c56c
1
Parent(s):
f7a698b
clear pipe
Browse files
src/f5_tts/train/finetune_gradio.py
CHANGED
@@ -392,11 +392,15 @@ def start_training(
|
|
392 |
):
|
393 |
global training_process, tts_api, stop_signal
|
394 |
|
395 |
-
if tts_api is not None:
|
396 |
-
|
|
|
|
|
|
|
397 |
gc.collect()
|
398 |
torch.cuda.empty_cache()
|
399 |
tts_api = None
|
|
|
400 |
|
401 |
path_project = os.path.join(path_data, dataset_name)
|
402 |
|
|
|
392 |
):
|
393 |
global training_process, tts_api, stop_signal
|
394 |
|
395 |
+
if tts_api is not None or pipe is not None:
|
396 |
+
if tts_api is not None:
|
397 |
+
del tts_api
|
398 |
+
if pipe is not None:
|
399 |
+
del pipe
|
400 |
gc.collect()
|
401 |
torch.cuda.empty_cache()
|
402 |
tts_api = None
|
403 |
+
pipe = None
|
404 |
|
405 |
path_project = os.path.join(path_data, dataset_name)
|
406 |
|