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

Method forward

diffsynth/models/cog_vae.py:179–185  ·  view source on GitHub ↗
(self, input: torch.Tensor, use_cache = True)

Source from the content-addressed store, hash-verified

177
178
179 def forward(self, input: torch.Tensor, use_cache = True) -> torch.Tensor:
180 if use_cache:
181 if self.cached_tensor is None:
182 self.cached_tensor = torch.concat([input[:, :, :1]] * 2, dim=2)
183 input = torch.concat([self.cached_tensor, input], dim=2)
184 self.cached_tensor = input[:, :, -2:]
185 return super().forward(input)
186
187
188

Callers

nothing calls this directly

Calls 1

forwardMethod · 0.45

Tested by

no test coverage detected