| 424 | return hidden_states |
| 425 | |
| 426 | class CLIPEncoder: |
| 427 | def __init__(self): |
| 428 | self.layers = [CLIPEncoderLayer() for i in range(12)] |
| 429 | |
| 430 | def __call__(self, hidden_states, causal_attention_mask): |
| 431 | for l in self.layers: |
| 432 | hidden_states = l(hidden_states, causal_attention_mask) |
| 433 | return hidden_states |
| 434 | |
| 435 | class CLIPTextEmbeddings: |
| 436 | def __init__(self): |