Skip to content

Commit 1410bd4

Browse files
chore(format): run black on dev (#59)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 3a79d81 commit 1410bd4

File tree

4 files changed

+26
-11
lines changed

4 files changed

+26
-11
lines changed

gui.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,14 @@ def event_handler(self):
623623
# "use_jit": values["use_jit"],
624624
"use_jit": False,
625625
"use_pv": values["use_pv"],
626-
"f0method": ["pm", "dio", "harvest", "crepe", "rmvpe", "fcpe"][
626+
"f0method": [
627+
"pm",
628+
"dio",
629+
"harvest",
630+
"crepe",
631+
"rmvpe",
632+
"fcpe",
633+
][
627634
[
628635
values["pm"],
629636
values["dio"],
@@ -728,7 +735,14 @@ def set_values(self, values):
728735
self.gui_config.rms_mix_rate = values["rms_mix_rate"]
729736
self.gui_config.index_rate = values["index_rate"]
730737
self.gui_config.n_cpu = values["n_cpu"]
731-
self.gui_config.f0method = ["pm", "dio", "harvest", "crepe", "rmvpe", "fcpe"][
738+
self.gui_config.f0method = [
739+
"pm",
740+
"dio",
741+
"harvest",
742+
"crepe",
743+
"rmvpe",
744+
"fcpe",
745+
][
732746
[
733747
values["pm"],
734748
values["dio"],

infer/lib/rtrvc.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,8 @@ def _get_f0_harvest(self, x, f0_up_key, filter_radius=3):
307307
self.f0_max,
308308
self.sr,
309309
)
310-
if filter_radius is None: filter_radius=3
310+
if filter_radius is None:
311+
filter_radius = 3
311312
f0 = self.harvest.compute_f0(x.cpu().numpy(), filter_radius=filter_radius)
312313
return self._get_f0_post(f0, f0_up_key)
313314

@@ -342,7 +343,8 @@ def _get_f0_rmvpe(self, x, f0_up_key, filter_radius=0.03):
342343
device=self.device,
343344
use_jit=self.use_jit,
344345
)
345-
if filter_radius is None: filter_radius=0.03
346+
if filter_radius is None:
347+
filter_radius = 0.03
346348
return self._get_f0_post(
347349
self.rmvpe.compute_f0(x, filter_radius=filter_radius),
348350
f0_up_key,

rvc/layers/nsf.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,9 @@ def forward(
153153
if n_res is not None:
154154
n_res = int(n_res)
155155
if n_res * self.upp != har_source.shape[-1]:
156-
har_source = F.interpolate(har_source, size=n_res * self.upp, mode="linear")
156+
har_source = F.interpolate(
157+
har_source, size=n_res * self.upp, mode="linear"
158+
)
157159
if n_res != x.shape[-1]:
158160
x = F.interpolate(x, size=n_res, mode="linear")
159161

rvc/layers/synthesizers.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,8 @@ def infer(
186186
head = int(skip_head)
187187
length = int(return_length)
188188
flow_head = head - 24
189-
if flow_head < 0: flow_head = 0
189+
if flow_head < 0:
190+
flow_head = 0
190191
dec_head = head - flow_head
191192
m_p, logs_p, x_mask = self.enc_p(phone, pitch, phone_lengths, flow_head)
192193
z_p = (m_p + torch.exp(logs_p) * torch.randn_like(m_p) * 0.66666) * x_mask
@@ -208,11 +209,7 @@ def infer(
208209
n_res=return_length2,
209210
)
210211
else:
211-
o = self.dec(
212-
z * x_mask,
213-
g=g,
214-
n_res=return_length2
215-
)
212+
o = self.dec(z * x_mask, g=g, n_res=return_length2)
216213
del x_mask, z
217214
return o # , x_mask, (z, z_p, m_p, logs_p)
218215

0 commit comments

Comments
 (0)