MCPcopy Create free account
hub / github.com/ali-vilab/ACE_plus / encode

Method encode

modules/embedder.py:186–193  ·  view source on GitHub ↗
(self, text, return_mask = False)

Source from the content-addressed store, hash-verified

184 self.clip_model = EMBEDDERS.build(cfg.CLIP_MODEL, logger=logger)
185
186 def encode(self, text, return_mask = False):
187 t5_embeds = self.t5_model.encode(text, return_mask = return_mask)
188 clip_embeds = self.clip_model.encode(text, return_mask = return_mask)
189 # change embedding strategy here
190 return {
191 'context': t5_embeds,
192 'y': clip_embeds,
193 }
194
195 def encode_list(self, text, return_mask = False):
196 t5_embeds = self.t5_model.encode_list(text, return_mask = return_mask)

Callers

nothing calls this directly

Calls 1

encodeMethod · 0.45

Tested by

no test coverage detected