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

Method forward

diffsynth/models/stepvideo_text_encoder.py:476–494  ·  view source on GitHub ↗
(
        self,
        hidden_states,
        attention_mask,
        cu_seqlens=None,
        max_seq_len=None,
    )

Source from the content-addressed store, hash-verified

474 return layers
475
476 def forward(
477 self,
478 hidden_states,
479 attention_mask,
480 cu_seqlens=None,
481 max_seq_len=None,
482 ):
483
484 if max_seq_len is not None and not isinstance(max_seq_len, torch.Tensor):
485 max_seq_len = torch.tensor(max_seq_len, dtype=torch.int32, device="cpu")
486
487 for lid, layer in enumerate(self.layers):
488 hidden_states = layer(
489 hidden_states,
490 attention_mask,
491 cu_seqlens,
492 max_seq_len,
493 )
494 return hidden_states
495
496
497class Step1Model(PreTrainedModel):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected