Fix: TTSModel.unload() did not work in PyTorch-independent environments

This commit is contained in:
tsukumi
2024-12-19 13:51:52 +09:00
parent e1ce12a336
commit b843804a75

View File

@@ -230,12 +230,12 @@ class TTSModel:
PyTorch モデルの場合は CUDA メモリも解放される。 PyTorch モデルの場合は CUDA メモリも解放される。
""" """
import torch
start_time = time.time() start_time = time.time()
# PyTorch 推論時 # PyTorch 推論時
if self.net_g is not None: if self.net_g is not None:
import torch
del self.net_g del self.net_g
self.net_g = None self.net_g = None