mirror of
https://github.com/fumiama/Retrieval-based-Voice-Conversion-WebUI.git
synced 2026-06-06 17:50:25 +08:00
chore(format): run black on dev (#136)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
43d19eb00e
commit
96f7bccb12
@@ -40,7 +40,8 @@ device = sys.argv[4]
|
|||||||
is_half = sys.argv[5] == "True"
|
is_half = sys.argv[5] == "True"
|
||||||
|
|
||||||
if importlib.util.find_spec("torch_directml") is not None:
|
if importlib.util.find_spec("torch_directml") is not None:
|
||||||
import torch_directml # use side effect
|
import torch_directml # use side effect
|
||||||
|
|
||||||
|
|
||||||
class FeatureInput(object):
|
class FeatureInput(object):
|
||||||
def __init__(self, is_half: bool, device="cpu", samplerate=16000, hop_size=160):
|
def __init__(self, is_half: bool, device="cpu", samplerate=16000, hop_size=160):
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ class SynthesizerTrnMsNSFsid(nn.Module):
|
|||||||
)
|
)
|
||||||
if pitchf is not None and isinstance(self.dec, NSFGenerator):
|
if pitchf is not None and isinstance(self.dec, NSFGenerator):
|
||||||
pitchf = slice_on_last_dim(pitchf, ids_slice, self.segment_size)
|
pitchf = slice_on_last_dim(pitchf, ids_slice, self.segment_size)
|
||||||
o = self.dec(z_slice, pitchf, g=embg) # type: ignore
|
o = self.dec(z_slice, pitchf, g=embg) # type: ignore
|
||||||
elif isinstance(self.dec, Generator):
|
elif isinstance(self.dec, Generator):
|
||||||
o = self.dec(z_slice, g=embg)
|
o = self.dec(z_slice, g=embg)
|
||||||
else:
|
else:
|
||||||
@@ -204,7 +204,7 @@ class SynthesizerTrnMsNSFsid(nn.Module):
|
|||||||
z = self.flow(z_p, x_mask, g=g, reverse=True)
|
z = self.flow(z_p, x_mask, g=g, reverse=True)
|
||||||
del z_p, m_p, logs_p
|
del z_p, m_p, logs_p
|
||||||
if pitchf is not None and isinstance(self.dec, NSFGenerator):
|
if pitchf is not None and isinstance(self.dec, NSFGenerator):
|
||||||
o = self.dec(
|
o = self.dec(
|
||||||
z * x_mask,
|
z * x_mask,
|
||||||
pitchf,
|
pitchf,
|
||||||
g=g,
|
g=g,
|
||||||
|
|||||||
Reference in New Issue
Block a user