(self, x_or_x_list)
| 308 | return attn_bias.split(x) |
| 309 | |
| 310 | def forward(self, x_or_x_list): |
| 311 | if isinstance(x_or_x_list, Tensor): |
| 312 | return super().forward(x_or_x_list) |
| 313 | elif isinstance(x_or_x_list, list): |
| 314 | if not XFORMERS_AVAILABLE: |
| 315 | raise AssertionError("xFormers is required for using nested tensors") |
| 316 | return self.forward_nested(x_or_x_list) |
| 317 | else: |
| 318 | raise AssertionError |
nothing calls this directly
no test coverage detected