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

Class TPool

wan/models/wan_vae_tiny.py:33–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31
32
33class TPool(nn.Module):
34 def __init__(self, n_f, stride):
35 super().__init__()
36 self.stride = stride
37 self.conv = nn.Conv2d(n_f * stride, n_f, 1, bias=False)
38
39 def forward(self, x):
40 _NT, C, H, W = x.shape
41 return self.conv(x.reshape(-1, self.stride * C, H, W))
42
43
44class TGrow(nn.Module):

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected