Spaces:
Sleeping
Sleeping
Update ip_adapter/attention_processor.py
Browse files
ip_adapter/attention_processor.py
CHANGED
|
@@ -356,8 +356,8 @@ class IPAttnProcessor2_0(torch.nn.Module):
|
|
| 356 |
)
|
| 357 |
|
| 358 |
hidden_states = hidden_states.transpose(1, 2).reshape(batch_size, -1, attn.heads * head_dim)
|
| 359 |
-
|
| 360 |
-
hidden_states = hidden_states.to(torch.float32)
|
| 361 |
|
| 362 |
# for ip-adapter
|
| 363 |
ip_key = self.to_k_ip(ip_hidden_states)
|
|
|
|
| 356 |
)
|
| 357 |
|
| 358 |
hidden_states = hidden_states.transpose(1, 2).reshape(batch_size, -1, attn.heads * head_dim)
|
| 359 |
+
hidden_states = hidden_states.to(query.dtype)
|
| 360 |
+
#hidden_states = hidden_states.to(torch.float32)
|
| 361 |
|
| 362 |
# for ip-adapter
|
| 363 |
ip_key = self.to_k_ip(ip_hidden_states)
|