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

Method forward

diffsynth/extensions/ESRGAN/__init__.py:56–67  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

54 self.lrelu = torch.nn.LeakyReLU(negative_slope=0.2, inplace=True)
55
56 def forward(self, x):
57 feat = x
58 feat = self.conv_first(feat)
59 body_feat = self.conv_body(self.body(feat))
60 feat = feat + body_feat
61 # upsample
62 feat = repeat(feat, "B C H W -> B C (H 2) (W 2)")
63 feat = self.lrelu(self.conv_up1(feat))
64 feat = repeat(feat, "B C H W -> B C (H 2) (W 2)")
65 feat = self.lrelu(self.conv_up2(feat))
66 out = self.conv_last(self.lrelu(self.conv_hr(feat)))
67 return out
68
69 @staticmethod
70 def state_dict_converter():

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected