MCPcopy
hub / github.com/Robbyant/lingbot-world / forward

Method forward

wan/modules/vae2_2.py:33–41  ·  view source on GitHub ↗
(self, x, cache_x=None)

Source from the content-addressed store, hash-verified

31 self.padding = (0, 0, 0)
32
33 def forward(self, x, cache_x=None):
34 padding = list(self._padding)
35 if cache_x is not None and self._padding[4] > 0:
36 cache_x = cache_x.to(x.device)
37 x = torch.cat([cache_x, x], dim=2)
38 padding[4] -= cache_x.shape[2]
39 x = F.pad(x, padding)
40
41 return super().forward(x)
42
43
44class RMS_norm(nn.Module):

Callers

nothing calls this directly

Calls 2

toMethod · 0.80
forwardMethod · 0.45

Tested by

no test coverage detected