MCPcopy
hub / github.com/Tencent-Hunyuan/HunyuanVideo-I2V / forward

Method forward

hyvideo/text_encoder/__init__.py:519–536  ·  view source on GitHub ↗
(
        self,
        text,
        use_attention_mask=None,
        output_hidden_states=False,
        do_sample=False,
        hidden_state_skip_layer=None,
        return_texts=False,
    )

Source from the content-addressed store, hash-verified

517 return TextEncoderModelOutput(last_hidden_state, attention_mask)
518
519 def forward(
520 self,
521 text,
522 use_attention_mask=None,
523 output_hidden_states=False,
524 do_sample=False,
525 hidden_state_skip_layer=None,
526 return_texts=False,
527 ):
528 batch_encoding = self.text2tokens(text)
529 return self.encode(
530 batch_encoding,
531 use_attention_mask=use_attention_mask,
532 output_hidden_states=output_hidden_states,
533 do_sample=do_sample,
534 hidden_state_skip_layer=hidden_state_skip_layer,
535 return_texts=return_texts,
536 )

Callers

nothing calls this directly

Calls 2

text2tokensMethod · 0.95
encodeMethod · 0.95

Tested by

no test coverage detected