fix: 卸载音色省显存

顺便将所有print换成了统一的logger
This commit is contained in:
源文雨
2023-09-01 15:18:08 +08:00
parent 8d5a77dbe9
commit 04a33b9709
23 changed files with 189 additions and 106 deletions

View File

@@ -1,5 +1,7 @@
import os
import traceback
import logging
logger = logging.getLogger(__name__)
import ffmpeg
import torch
@@ -92,5 +94,5 @@ def uvr(model_name, inp_root, save_root_vocal, paths, save_root_ins, agg, format
traceback.print_exc()
if torch.cuda.is_available():
torch.cuda.empty_cache()
print("Executed torch.cuda.empty_cache()")
logger.info("Executed torch.cuda.empty_cache()")
yield "\n".join(infos)