MCPcopy Create free account
hub / github.com/MeiGen-AI/MultiTalk / __call__

Method __call__

wan/modules/t5.py:528–535  ·  view source on GitHub ↗
(self, texts, device)

Source from the content-addressed store, hash-verified

526 name=tokenizer_path, seq_len=text_len, clean='whitespace')
527
528 def __call__(self, texts, device):
529 ids, mask = self.tokenizer(
530 texts, return_mask=True, add_special_tokens=True)
531 ids = ids.to(device)
532 mask = mask.to(device)
533 seq_lens = mask.gt(0).sum(dim=1).long()
534 context = self.model(ids, mask)
535 return [u[:v] for u, v in zip(context, seq_lens)]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected