MCPcopy Create free account
hub / github.com/VisionXLab/OF-Diff / forward

Method forward

ldm/modules/encoders/modules.py:170–173  ·  view source on GitHub ↗
(self, text)

Source from the content-addressed store, hash-verified

168 param.requires_grad = False
169
170 def forward(self, text):
171 tokens = open_clip.tokenize(text)
172 z = self.encode_with_transformer(tokens.to(self.device))
173 return z
174
175 def encode_with_transformer(self, text):
176 x = self.model.token_embedding(text) # [batch_size, n_ctx, d_model]

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected