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

Method forward

diffsynth/models/kolors_text_encoder.py:979–988  ·  view source on GitHub ↗
(self, input_ids)

Source from the content-addressed store, hash-verified

977 self.fp32_residual_connection = config.fp32_residual_connection
978
979 def forward(self, input_ids):
980 # Embeddings.
981 words_embeddings = self.word_embeddings(input_ids)
982 embeddings = words_embeddings
983 # Data format change to avoid explicit transposes : [b s h] --> [s b h].
984 embeddings = embeddings.transpose(0, 1).contiguous()
985 # If the input flag for fp32 residual connection is set, convert for float.
986 if self.fp32_residual_connection:
987 embeddings = embeddings.float()
988 return embeddings
989
990
991class ChatGLMModel(ChatGLMPreTrainedModel):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected