MCPcopy Create free account
hub / github.com/MotrixLab/ViMoGen / __call__

Method __call__

models/transformer/wan/modules/t5.py:506–513  ·  view source on GitHub ↗
(self, texts, device)

Source from the content-addressed store, hash-verified

504 name=tokenizer_path, seq_len=text_len, clean='whitespace')
505
506 def __call__(self, texts, device):
507 ids, mask = self.tokenizer(
508 texts, return_mask=True, add_special_tokens=True)
509 ids = ids.to(device)
510 mask = mask.to(device)
511 seq_lens = mask.gt(0).sum(dim=1).long()
512 context = self.model(ids, mask)
513 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