From 7dcb6b228bde6cabb477d3e20f5796d236c1a6b7 Mon Sep 17 00:00:00 2001 From: Patrick Darwinkel Date: Tue, 2 Apr 2024 16:15:52 +0200 Subject: [PATCH] Use eval() instead of train(False) --- shepardtts/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shepardtts/utils.py b/shepardtts/utils.py index b91777a..c8e63a3 100644 --- a/shepardtts/utils.py +++ b/shepardtts/utils.py @@ -28,11 +28,11 @@ def load_checkpoint() -> ShepardXtts: use_deepspeed=use_deepspeed, ) model.to(settings.DEVICE) + model.eval() if settings.DEVICE == "cpu": import intel_extension_for_pytorch as ipex - model.train(mode=False) model = ipex.optimize(model, weights_prepack=False, dtype=torch.float16) model = torch.compile(model, backend="ipex")