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

Method __init__

diffsynth/models/kolors_text_encoder.py:966–977  ·  view source on GitHub ↗
(self, config: ChatGLMConfig, device=None)

Source from the content-addressed store, hash-verified

964 """Language model embeddings."""
965
966 def __init__(self, config: ChatGLMConfig, device=None):
967 super(Embedding, self).__init__()
968
969 self.hidden_size = config.hidden_size
970 # Word embeddings (parallel).
971 self.word_embeddings = nn.Embedding(
972 config.padded_vocab_size,
973 self.hidden_size,
974 dtype=config.torch_dtype,
975 device=device
976 )
977 self.fp32_residual_connection = config.fp32_residual_connection
978
979 def forward(self, input_ids):
980 # Embeddings.

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected