1
0
mirror of https://github.com/fumiama/Retrieval-based-Voice-Conversion-WebUI.git synced 2026-06-10 04:50:26 +08:00

chore(format): run black on dev (#13)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
github-actions[bot]
2024-06-09 15:37:32 +09:00
committed by GitHub
parent 5790ea7a73
commit 95f627d991
6 changed files with 16 additions and 8 deletions

View File

@@ -229,6 +229,7 @@ class FFN(nn.Module):
""" """
Feed-Forward Network Feed-Forward Network
""" """
def __init__( def __init__(
self, self,
in_channels: int, in_channels: int,

View File

@@ -161,6 +161,7 @@ class TextEncoder(nn.Module):
m, logs = torch.split(stats, self.out_channels, dim=1) m, logs = torch.split(stats, self.out_channels, dim=1)
return m, logs, x_mask return m, logs, x_mask
class PosteriorEncoder(nn.Module): class PosteriorEncoder(nn.Module):
def __init__( def __init__(
self, self,

View File

@@ -9,6 +9,7 @@ from torch.nn.utils import remove_weight_norm, weight_norm
from .residuals import ResBlock1, ResBlock2, LRELU_SLOPE from .residuals import ResBlock1, ResBlock2, LRELU_SLOPE
from .utils import call_weight_data_normal_if_Conv from .utils import call_weight_data_normal_if_Conv
class Generator(torch.nn.Module): class Generator(torch.nn.Module):
def __init__( def __init__(
self, self,
@@ -157,10 +158,14 @@ class SineGenerator(torch.nn.Module):
self.sampling_rate = samp_rate self.sampling_rate = samp_rate
self.voiced_threshold = voiced_threshold self.voiced_threshold = voiced_threshold
def __call__(self, f0: torch.Tensor, upp: int) -> Tuple[torch.Tensor, torch.Tensor, torch.Tensor]: def __call__(
self, f0: torch.Tensor, upp: int
) -> Tuple[torch.Tensor, torch.Tensor, torch.Tensor]:
return super().__call__(f0, upp) return super().__call__(f0, upp)
def forward(self, f0: torch.Tensor, upp: int) -> Tuple[torch.Tensor, torch.Tensor, torch.Tensor]: def forward(
self, f0: torch.Tensor, upp: int
) -> Tuple[torch.Tensor, torch.Tensor, torch.Tensor]:
"""sine_tensor, uv = forward(f0) """sine_tensor, uv = forward(f0)
input F0: tensor(batchsize=1, length, dim=1) input F0: tensor(batchsize=1, length, dim=1)
f0 for unvoiced steps should be 0 f0 for unvoiced steps should be 0

View File

@@ -59,6 +59,7 @@ class SourceModuleHnNSF(torch.nn.Module):
sine_merge: torch.Tensor = self.l_tanh(self.l_linear(sine_wavs)) sine_merge: torch.Tensor = self.l_tanh(self.l_linear(sine_wavs))
return sine_merge # , None, None # noise, uv return sine_merge # , None, None # noise, uv
class NSFGenerator(torch.nn.Module): class NSFGenerator(torch.nn.Module):
def __init__( def __init__(
self, self,