diff --git a/gui.py b/gui.py index e1d3a4a..43aa71a 100644 --- a/gui.py +++ b/gui.py @@ -623,7 +623,14 @@ if __name__ == "__main__": # "use_jit": values["use_jit"], "use_jit": False, "use_pv": values["use_pv"], - "f0method": ["pm", "dio", "harvest", "crepe", "rmvpe", "fcpe"][ + "f0method": [ + "pm", + "dio", + "harvest", + "crepe", + "rmvpe", + "fcpe", + ][ [ values["pm"], values["dio"], @@ -728,7 +735,14 @@ if __name__ == "__main__": self.gui_config.rms_mix_rate = values["rms_mix_rate"] self.gui_config.index_rate = values["index_rate"] self.gui_config.n_cpu = values["n_cpu"] - self.gui_config.f0method = ["pm", "dio", "harvest", "crepe", "rmvpe", "fcpe"][ + self.gui_config.f0method = [ + "pm", + "dio", + "harvest", + "crepe", + "rmvpe", + "fcpe", + ][ [ values["pm"], values["dio"], diff --git a/infer/lib/rtrvc.py b/infer/lib/rtrvc.py index 1a07b7d..b55a69b 100644 --- a/infer/lib/rtrvc.py +++ b/infer/lib/rtrvc.py @@ -307,7 +307,8 @@ class RVC: self.f0_max, self.sr, ) - if filter_radius is None: filter_radius=3 + if filter_radius is None: + filter_radius = 3 f0 = self.harvest.compute_f0(x.cpu().numpy(), filter_radius=filter_radius) return self._get_f0_post(f0, f0_up_key) @@ -342,7 +343,8 @@ class RVC: device=self.device, use_jit=self.use_jit, ) - if filter_radius is None: filter_radius=0.03 + if filter_radius is None: + filter_radius = 0.03 return self._get_f0_post( self.rmvpe.compute_f0(x, filter_radius=filter_radius), f0_up_key, diff --git a/rvc/layers/nsf.py b/rvc/layers/nsf.py index 2d06a0c..5e9e35a 100644 --- a/rvc/layers/nsf.py +++ b/rvc/layers/nsf.py @@ -153,7 +153,9 @@ class NSFGenerator(torch.nn.Module): if n_res is not None: n_res = int(n_res) if n_res * self.upp != har_source.shape[-1]: - har_source = F.interpolate(har_source, size=n_res * self.upp, mode="linear") + har_source = F.interpolate( + har_source, size=n_res * self.upp, mode="linear" + ) if n_res != x.shape[-1]: x = F.interpolate(x, size=n_res, mode="linear") diff --git a/rvc/layers/synthesizers.py b/rvc/layers/synthesizers.py index 7a9c704..474781e 100644 --- a/rvc/layers/synthesizers.py +++ b/rvc/layers/synthesizers.py @@ -186,7 +186,8 @@ class SynthesizerTrnMsNSFsid(nn.Module): head = int(skip_head) length = int(return_length) flow_head = head - 24 - if flow_head < 0: flow_head = 0 + if flow_head < 0: + flow_head = 0 dec_head = head - flow_head m_p, logs_p, x_mask = self.enc_p(phone, pitch, phone_lengths, flow_head) z_p = (m_p + torch.exp(logs_p) * torch.randn_like(m_p) * 0.66666) * x_mask @@ -208,11 +209,7 @@ class SynthesizerTrnMsNSFsid(nn.Module): n_res=return_length2, ) else: - o = self.dec( - z * x_mask, - g=g, - n_res=return_length2 - ) + o = self.dec(z * x_mask, g=g, n_res=return_length2) del x_mask, z return o # , x_mask, (z, z_p, m_p, logs_p)