Update pipeline.py
Browse filesFix value projection of hidden_states_ptb in PAGIdentitySelfAttnProcessor
- pipeline.py +2 -2
pipeline.py
CHANGED
@@ -134,8 +134,8 @@ class PAGIdentitySelfAttnProcessor:
|
|
134 |
|
135 |
value = attn.to_v(hidden_states_ptb)
|
136 |
|
137 |
-
hidden_states_ptb = torch.zeros(value.shape).to(value.get_device())
|
138 |
-
|
139 |
|
140 |
hidden_states_ptb = hidden_states_ptb.to(query.dtype)
|
141 |
|
|
|
134 |
|
135 |
value = attn.to_v(hidden_states_ptb)
|
136 |
|
137 |
+
# hidden_states_ptb = torch.zeros(value.shape).to(value.get_device())
|
138 |
+
hidden_states_ptb = value
|
139 |
|
140 |
hidden_states_ptb = hidden_states_ptb.to(query.dtype)
|
141 |
|