ChatTTS-Forge / modules /devices.py
zhzluke96
update
84cfd61
raw
history blame
179 Bytes
import torch
def torch_gc():
if torch.cuda.is_available():
with torch.cuda.device("cuda"):
torch.cuda.empty_cache()
torch.cuda.ipc_collect()