(self, hidden_states, encoder_hidden_states=None, attention_mask=None, video_length=None)
| 211 | |
| 212 | |
| 213 | def forward(self, hidden_states, encoder_hidden_states=None, attention_mask=None, video_length=None): |
| 214 | for attention_block, norm in zip(self.attention_blocks, self.norms): |
| 215 | norm_hidden_states = norm(hidden_states) |
| 216 | hidden_states = attention_block( |
| 217 | norm_hidden_states, |
| 218 | encoder_hidden_states=encoder_hidden_states if attention_block.is_cross_attention else None, |
| 219 | video_length=video_length, |
| 220 | ) + hidden_states |
| 221 | |
| 222 | hidden_states = self.ff(self.ff_norm(hidden_states)) + hidden_states |
| 223 | |
| 224 | output = hidden_states |
| 225 | return output |
| 226 | |
| 227 | |
| 228 | class PositionalEncoding(nn.Module): |
nothing calls this directly
no outgoing calls
no test coverage detected