mirror of
https://github.com/fumiama/Retrieval-based-Voice-Conversion-WebUI.git
synced 2026-06-07 10:10:23 +08:00
Fix memory doesn't unload on mps device (#2035)
* Solving the cache not being cleared in mps * Fix protect not to be dict
This commit is contained in:
@@ -105,4 +105,7 @@ def uvr(model_name, inp_root, save_root_vocal, paths, save_root_ins, agg, format
|
||||
if torch.cuda.is_available():
|
||||
torch.cuda.empty_cache()
|
||||
logger.info("Executed torch.cuda.empty_cache()")
|
||||
elif torch.backends.mps.is_available():
|
||||
torch.mps.empty_cache()
|
||||
logger.info("Executed torch.mps.empty_cache()")
|
||||
yield "\n".join(infos)
|
||||
|
||||
Reference in New Issue
Block a user