MCPcopy Create free account
hub / github.com/OpenImagingLab/FlashVSR / __init__

Method __init__

diffsynth/models/svd_vae_decoder.py:47–54  ·  view source on GitHub ↗
(self, in_channels, out_channels, groups=32, eps=1e-5)

Source from the content-addressed store, hash-verified

45class TemporalResnetBlock(torch.nn.Module):
46
47 def __init__(self, in_channels, out_channels, groups=32, eps=1e-5):
48 super().__init__()
49 self.norm1 = torch.nn.GroupNorm(num_groups=groups, num_channels=in_channels, eps=eps, affine=True)
50 self.conv1 = torch.nn.Conv3d(in_channels, out_channels, kernel_size=(3, 1, 1), stride=1, padding=(1, 0, 0))
51 self.norm2 = torch.nn.GroupNorm(num_groups=groups, num_channels=out_channels, eps=eps, affine=True)
52 self.conv2 = torch.nn.Conv3d(out_channels, out_channels, kernel_size=(3, 1, 1), stride=1, padding=(1, 0, 0))
53 self.nonlinearity = torch.nn.SiLU()
54 self.mix_factor = torch.nn.Parameter(torch.Tensor([0.5]))
55
56 def forward(self, hidden_states, time_emb, text_emb, res_stack, **kwargs):
57 x_spatial = hidden_states

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected