Skip to content

Commit

Permalink
Update models.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Bebra777228 authored Aug 4, 2024
1 parent 2ab500b commit 5c4695a
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/infer_pack/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def __init__(
n_layers,
kernel_size,
p_dropout,
f0=True,
f0=True
):
super().__init__()
self.out_channels = out_channels
Expand Down Expand Up @@ -67,7 +67,7 @@ def __init__(
n_layers,
kernel_size,
p_dropout,
f0=True,
f0=True
):
super().__init__()
self.out_channels = out_channels
Expand Down Expand Up @@ -109,7 +109,7 @@ def __init__(
dilation_rate,
n_layers,
n_flows=4,
gin_channels=0,
gin_channels=0
):
super().__init__()
self.channels = channels
Expand Down Expand Up @@ -148,7 +148,7 @@ def __init__(
kernel_size,
dilation_rate,
n_layers,
gin_channels=0,
gin_channels=0
):
super().__init__()
self.in_channels = in_channels
Expand Down Expand Up @@ -186,7 +186,7 @@ def __init__(
upsample_rates,
upsample_initial_channel,
upsample_kernel_sizes,
gin_channels=0,
gin_channels=0
):
super().__init__()
self.num_kernels = len(resblock_kernel_sizes)
Expand Down Expand Up @@ -246,7 +246,7 @@ def __init__(
sine_amp=0.1,
noise_std=0.003,
voiced_threshold=0,
flag_for_pulse=False,
flag_for_pulse=False
):
super().__init__()
self.sine_amp = sine_amp
Expand Down Expand Up @@ -300,7 +300,7 @@ def __init__(
sine_amp=0.1,
add_noise_std=0.003,
voiced_threshod=0,
is_half=True,
is_half=True
):
super().__init__()

Expand Down Expand Up @@ -334,7 +334,7 @@ def __init__(
upsample_kernel_sizes,
gin_channels,
sr,
is_half=False,
is_half=False
):
super().__init__()
self.num_kernels = len(resblock_kernel_sizes)
Expand Down Expand Up @@ -404,7 +404,7 @@ def remove_weight_norm(self):
sr2sr = {
"32k": 32000,
"40k": 40000,
"48k": 48000,
"48k": 48000
}


Expand Down Expand Up @@ -773,7 +773,7 @@ def __init__(self, use_spectral_norm=False):
norm_f(Conv1d(64, 256, 41, 4, groups=16, padding=20)),
norm_f(Conv1d(256, 1024, 41, 4, groups=64, padding=20)),
norm_f(Conv1d(1024, 1024, 41, 4, groups=256, padding=20)),
norm_f(Conv1d(1024, 1024, 5, 1, padding=2)),
norm_f(Conv1d(1024, 1024, 5, 1, padding=2))
]
)
self.conv_post = norm_f(Conv1d(1024, 1, 3, 1, padding=1))
Expand Down Expand Up @@ -802,7 +802,7 @@ def __init__(self, period, kernel_size=5, stride=3, use_spectral_norm=False):
norm_f(Conv2d(32, 128, (kernel_size, 1), (stride, 1), padding=(get_padding(kernel_size, 1), 0))),
norm_f(Conv2d(128, 512, (kernel_size, 1), (stride, 1), padding=(get_padding(kernel_size, 1), 0))),
norm_f(Conv2d(512, 1024, (kernel_size, 1), (stride, 1), padding=(get_padding(kernel_size, 1), 0))),
norm_f(Conv2d(1024, 1024, (kernel_size, 1), 1, padding=(get_padding(kernel_size, 1), 0))),
norm_f(Conv2d(1024, 1024, (kernel_size, 1), 1, padding=(get_padding(kernel_size, 1), 0)))
])
self.conv_post = norm_f(Conv2d(1024, 1, (3, 1), 1, padding=(1, 0)))

Expand Down

0 comments on commit 5c4695a

Please sign in to comment.