From a322e706f9d35fa971fb6f252703c7da54829a4a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 5 Jun 2024 15:32:33 +0900 Subject: [PATCH] chore(format): run black on dev (#2106) Co-authored-by: github-actions[bot] --- infer/lib/jit/synthesizer.py | 5 ++++- infer/modules/vc/modules.py | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/infer/lib/jit/synthesizer.py b/infer/lib/jit/synthesizer.py index 5069fe9..b117989 100644 --- a/infer/lib/jit/synthesizer.py +++ b/infer/lib/jit/synthesizer.py @@ -1,5 +1,6 @@ import torch + def get_synthesizer_ckpt(cpt, device=torch.device("cpu")): from infer.lib.infer_pack.models import ( SynthesizerTrnMs256NSFsid, @@ -35,7 +36,9 @@ def get_synthesizer_ckpt(cpt, device=torch.device("cpu")): net_g.remove_weight_norm() return net_g, cpt + def get_synthesizer(pth_path, device=torch.device("cpu")): return get_synthesizer_ckpt( - torch.load(pth_path, map_location=torch.device("cpu")), device, + torch.load(pth_path, map_location=torch.device("cpu")), + device, ) diff --git a/infer/modules/vc/modules.py b/infer/modules/vc/modules.py index fe71180..d33a2bb 100644 --- a/infer/modules/vc/modules.py +++ b/infer/modules/vc/modules.py @@ -62,7 +62,9 @@ class VC: elif torch.backends.mps.is_available(): torch.mps.empty_cache() ###楼下不这么折腾清理不干净 - self.net_g, self.cpt = get_synthesizer_ckpt(self.cpt, self.config.device) + self.net_g, self.cpt = get_synthesizer_ckpt( + self.cpt, self.config.device + ) self.if_f0 = self.cpt.get("f0", 1) self.version = self.cpt.get("version", "v1") del self.net_g, self.cpt