MCPcopy Create free account
hub / github.com/Francis-Rings/FlashPortrait / __init__

Method __init__

wan/models/wan_vae_tiny.py:23–27  ·  view source on GitHub ↗
(self, n_in, n_out, act_func)

Source from the content-addressed store, hash-verified

21
22class MemBlock(nn.Module):
23 def __init__(self, n_in, n_out, act_func):
24 super().__init__()
25 self.conv = nn.Sequential(conv(n_in * 2, n_out), act_func, conv(n_out, n_out), act_func, conv(n_out, n_out))
26 self.skip = nn.Conv2d(n_in, n_out, 1, bias=False) if n_in != n_out else nn.Identity()
27 self.act = act_func
28
29 def forward(self, x, past):
30 return self.act(self.conv(torch.cat([x, past], 1)) + self.skip(x))

Callers

nothing calls this directly

Calls 2

convFunction · 0.85
__init__Method · 0.45

Tested by

no test coverage detected