(self, id_embeds)
| 19 | self.norm = torch.nn.LayerNorm(cross_attention_dim) |
| 20 | |
| 21 | def forward(self, id_embeds): |
| 22 | x = self.proj(id_embeds) |
| 23 | x = x.reshape(-1, self.num_tokens, self.cross_attention_dim) |
| 24 | x = self.norm(x) |
| 25 | return x |
| 26 | |
| 27 | class IpAdapterModule(torch.nn.Module): |
| 28 | def __init__(self, num_attention_heads, attention_head_dim, input_dim): |