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

Method patchfy

diffsynth/models/stepvideo_dit.py:812–815  ·  view source on GitHub ↗
(self, hidden_states)

Source from the content-addressed store, hash-verified

810 self.parallel = attention_type=='parallel'
811
812 def patchfy(self, hidden_states):
813 hidden_states = rearrange(hidden_states, 'b f c h w -> (b f) c h w')
814 hidden_states = self.pos_embed(hidden_states)
815 return hidden_states
816
817 def prepare_attn_mask(self, encoder_attention_mask, encoder_hidden_states, q_seqlen):
818 kv_seqlens = encoder_attention_mask.sum(dim=1).int()

Callers 1

forwardMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected