Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkMLCode committed Sep 3, 2024
1 parent f4dda72 commit 92c55ab
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tortoise/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,6 @@ def __init__(self, autoregressive_batch_size=None, models_dir=MODELS_DIR,

if self.device_only:
self.autoregressive = self.autoregressive.to(self.device)
self.autoregressive_ai = self.autoregressive_ai.cpu()
self.diffusion = self.diffusion.to(self.device)
self.clvp = self.clvp.to(self.device)
self.vocoder = self.vocoder.to(self.device)
Expand Down Expand Up @@ -315,7 +314,7 @@ def switch_model(self, is_narrator):
self.autoregressive_ai = self.autoregressive_ai.to(self.device)
self.autoregressive = self.autoregressive_ai

gc.collect()
#gc.collect()
torch.cuda.empty_cache()

self.is_narrator = is_narrator
Expand Down

0 comments on commit 92c55ab

Please sign in to comment.