From 6d8017f724155afe5b7f578a55e58432f11c5a24 Mon Sep 17 00:00:00 2001 From: XXXXRT666 <157766680+XXXXRT666@users.noreply.github.com> Date: Mon, 27 May 2024 04:12:51 +0100 Subject: [PATCH] Update models.py (#1116) --- GPT_SoVITS/module/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GPT_SoVITS/module/models.py b/GPT_SoVITS/module/models.py index 00590331..58a21eee 100644 --- a/GPT_SoVITS/module/models.py +++ b/GPT_SoVITS/module/models.py @@ -907,7 +907,7 @@ class SynthesizerTrn(nn.Module): ge = self.ref_enc(y * y_mask, y_mask) with autocast(enabled=False): - maybe_no_grad = torch.no_grad() if self.freeze_quantizer else contextlib.nullcontext + maybe_no_grad = torch.no_grad() if self.freeze_quantizer else contextlib.nullcontext() with maybe_no_grad: if self.freeze_quantizer: self.ssl_proj.eval()