From be7c5056f7df3549db3c613549d838eeab745dfb Mon Sep 17 00:00:00 2001 From: manmay-nakhashi Date: Sun, 16 Jul 2023 01:06:19 +0530 Subject: [PATCH] remove var --- tortoise/api.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tortoise/api.py b/tortoise/api.py index caeb7ac..aea41ae 100644 --- a/tortoise/api.py +++ b/tortoise/api.py @@ -252,12 +252,9 @@ class TextToSpeech: self.rlg_diffusion = None @contextmanager def temporary_cuda(self, model): - if self.high_vram: - yield model - else: - m = model.to(self.device) - yield m - m = model.cpu() + m = model.to(self.device) + yield m + m = model.cpu() def load_cvvp(self): """Load CVVP model."""