From b4f7bbbe391314406af0d3154ab50de680b91fd1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 12 Jun 2024 14:55:48 +0900 Subject: [PATCH] chore(format): run black on dev (#40) Co-authored-by: github-actions[bot] --- infer/modules/vc/modules.py | 4 +--- rvc/hubert.py | 4 +--- rvc/synthesizer.py | 3 ++- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/infer/modules/vc/modules.py b/infer/modules/vc/modules.py index dd2e42b..49f21dc 100644 --- a/infer/modules/vc/modules.py +++ b/infer/modules/vc/modules.py @@ -62,9 +62,7 @@ class VC: elif torch.backends.mps.is_available(): torch.mps.empty_cache() ###楼下不这么折腾清理不干净 - self.net_g, self.cpt = get_synthesizer( - self.cpt, self.config.device - ) + self.net_g, self.cpt = get_synthesizer(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 diff --git a/rvc/hubert.py b/rvc/hubert.py index dbb4769..b9ac6b0 100644 --- a/rvc/hubert.py +++ b/rvc/hubert.py @@ -262,9 +262,7 @@ def apply_mask(self, x, padding_mask, target_list): return x, mask_indices -def get_hubert( - model_path="assets/hubert/hubert_base.pt", device=torch.device("cpu") -): +def get_hubert(model_path="assets/hubert/hubert_base.pt", device=torch.device("cpu")): models, _, _ = load_model_ensemble_and_task( [model_path], suffix="", diff --git a/rvc/synthesizer.py b/rvc/synthesizer.py index 9ff9266..e972d7f 100644 --- a/rvc/synthesizer.py +++ b/rvc/synthesizer.py @@ -27,7 +27,8 @@ def get_synthesizer(cpt: OrderedDict, device=torch.device("cpu")): def load_synthesizer( - pth_path: torch.serialization.FILE_LIKE, device=torch.device("cpu")): + pth_path: torch.serialization.FILE_LIKE, device=torch.device("cpu") +): return get_synthesizer( torch.load(pth_path, map_location=torch.device("cpu")), device,