MCPcopy Create free account
hub / github.com/Gadersd/stable-diffusion-burn / CLIPTextEmbeddings

Class CLIPTextEmbeddings

python/dump.py:435–441  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

433 return hidden_states
434
435class CLIPTextEmbeddings:
436 def __init__(self):
437 self.token_embedding = Embedding(49408, 768)
438 self.position_embedding = Embedding(77, 768)
439
440 def __call__(self, input_ids, position_ids):
441 return self.token_embedding(input_ids) + self.position_embedding(position_ids)
442
443class CLIPTextTransformer:
444 def __init__(self):

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected