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

Method forward

diffsynth/models/wan_video_dit.py:419–429  ·  view source on GitHub ↗

y 即文本上下文(未做其他分支)。

(self, x: torch.Tensor, y: torch.Tensor, is_stream: bool = False)

Source from the content-addressed store, hash-verified

417 self.cache_v = None
418
419 def forward(self, x: torch.Tensor, y: torch.Tensor, is_stream: bool = False):
420 """
421 y 即文本上下文(未做其他分支)。
422 """
423 q = self.norm_q(self.q(x))
424 assert self.cache_k is not None and self.cache_v is not None
425 k = self.cache_k
426 v = self.cache_v
427
428 x = self.attn(q, k, v)
429 return self.o(x)
430
431
432class GateModule(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected