(self, clip_model)
| 53 | |
| 54 | class TextEncoder(nn.Module): |
| 55 | def __init__(self, clip_model): |
| 56 | super().__init__() |
| 57 | self.transformer = clip_model.transformer |
| 58 | self.positional_embedding = clip_model.positional_embedding |
| 59 | self.ln_final = clip_model.ln_final |
| 60 | self.text_projection = clip_model.text_projection |
| 61 | self.dtype = clip_model.dtype |
| 62 | |
| 63 | def forward(self, prompts, tokenized_prompts): |
| 64 |