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

Method __init__

diffsynth/extensions/RIFE/__init__.py:35–43  ·  view source on GitHub ↗
(self, in_planes, c=64)

Source from the content-addressed store, hash-verified

33
34class IFBlock(nn.Module):
35 def __init__(self, in_planes, c=64):
36 super(IFBlock, self).__init__()
37 self.conv0 = nn.Sequential(conv(in_planes, c//2, 3, 2, 1), conv(c//2, c, 3, 2, 1),)
38 self.convblock0 = nn.Sequential(conv(c, c), conv(c, c))
39 self.convblock1 = nn.Sequential(conv(c, c), conv(c, c))
40 self.convblock2 = nn.Sequential(conv(c, c), conv(c, c))
41 self.convblock3 = nn.Sequential(conv(c, c), conv(c, c))
42 self.conv1 = nn.Sequential(nn.ConvTranspose2d(c, c//2, 4, 2, 1), nn.PReLU(c//2), nn.ConvTranspose2d(c//2, 4, 4, 2, 1))
43 self.conv2 = nn.Sequential(nn.ConvTranspose2d(c, c//2, 4, 2, 1), nn.PReLU(c//2), nn.ConvTranspose2d(c//2, 1, 4, 2, 1))
44
45 def forward(self, x, flow, scale=1):
46 x = F.interpolate(x, scale_factor= 1. / scale, mode="bilinear", align_corners=False, recompute_scale_factor=False)

Callers

nothing calls this directly

Calls 2

convFunction · 0.70
__init__Method · 0.45

Tested by

no test coverage detected