ford442 commited on
Commit
69ba39d
·
verified ·
1 Parent(s): e0ecdaf

Update ip_adapter/attention_processor.py

Browse files
Files changed (1) hide show
  1. ip_adapter/attention_processor.py +2 -1
ip_adapter/attention_processor.py CHANGED
@@ -356,7 +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
- hidden_states = hidden_states.to(query.dtype)
 
360
 
361
  # for ip-adapter
362
  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)