MCPcopy Create free account
hub / github.com/OpenMOSS/MOSS-TTS / DecoderBlock

Class DecoderBlock

moss_soundeffect_v2/diffsynth/models/dac_vae.py:750–769  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

748
749
750class DecoderBlock(nn.Module):
751 def __init__(self, input_dim: int = 16, output_dim: int = 8, stride: int = 1):
752 super().__init__()
753 self.block = nn.Sequential(
754 Snake1d(input_dim),
755 WNConvTranspose1d(
756 input_dim,
757 output_dim,
758 kernel_size=2 * stride,
759 stride=stride,
760 padding=math.ceil(stride / 2),
761 output_padding=stride % 2,
762 ),
763 ResidualUnit(output_dim, dilation=1),
764 ResidualUnit(output_dim, dilation=3),
765 ResidualUnit(output_dim, dilation=9),
766 )
767
768 def forward(self, x):
769 return self.block(x)
770
771
772class Decoder(nn.Module):

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected