(self, ckpt_path)
| 118 | self.max_text_len = max_text_len |
| 119 | |
| 120 | def load_pretrained(self, ckpt_path): |
| 121 | checkpoint = torch.load(ckpt_path, map_location='cpu') |
| 122 | self.text_encoder.load_state_dict(checkpoint['text_encoder']) |
| 123 | |
| 124 | def forward(self, text, token, device): |
| 125 | B = len(text) |