MCPcopy Create free account
hub / github.com/MeiGen-AI/MultiTalk / __init__

Method __init__

kokoro/istftnet.py:385–405  ·  view source on GitHub ↗
(self, dim_in, style_dim, dim_out, 
                 resblock_kernel_sizes,
                 upsample_rates,
                 upsample_initial_channel,
                 resblock_dilation_sizes,
                 upsample_kernel_sizes,
                 gen_istft_n_fft, gen_istft_hop_size,
                 disable_complex=False)

Source from the content-addressed store, hash-verified

383
384class Decoder(nn.Module):
385 def __init__(self, dim_in, style_dim, dim_out,
386 resblock_kernel_sizes,
387 upsample_rates,
388 upsample_initial_channel,
389 resblock_dilation_sizes,
390 upsample_kernel_sizes,
391 gen_istft_n_fft, gen_istft_hop_size,
392 disable_complex=False):
393 super().__init__()
394 self.encode = AdainResBlk1d(dim_in + 2, 1024, style_dim)
395 self.decode = nn.ModuleList()
396 self.decode.append(AdainResBlk1d(1024 + 2 + 64, 1024, style_dim))
397 self.decode.append(AdainResBlk1d(1024 + 2 + 64, 1024, style_dim))
398 self.decode.append(AdainResBlk1d(1024 + 2 + 64, 1024, style_dim))
399 self.decode.append(AdainResBlk1d(1024 + 2 + 64, 512, style_dim, upsample=True))
400 self.F0_conv = weight_norm(nn.Conv1d(1, 1, kernel_size=3, stride=2, groups=1, padding=1))
401 self.N_conv = weight_norm(nn.Conv1d(1, 1, kernel_size=3, stride=2, groups=1, padding=1))
402 self.asr_res = nn.Sequential(weight_norm(nn.Conv1d(512, 64, kernel_size=1)))
403 self.generator = Generator(style_dim, resblock_kernel_sizes, upsample_rates,
404 upsample_initial_channel, resblock_dilation_sizes,
405 upsample_kernel_sizes, gen_istft_n_fft, gen_istft_hop_size, disable_complex=disable_complex)
406
407 def forward(self, asr, F0_curve, N, s):
408 F0 = self.F0_conv(F0_curve.unsqueeze(1))

Callers

nothing calls this directly

Calls 3

AdainResBlk1dClass · 0.85
GeneratorClass · 0.85
__init__Method · 0.45

Tested by

no test coverage detected