(self, x_or_x_list)
| 264 | return attn_bias.split(x) |
| 265 | |
| 266 | def forward(self, x_or_x_list): |
| 267 | if isinstance(x_or_x_list, Tensor): |
| 268 | return super().forward(x_or_x_list) |
| 269 | elif isinstance(x_or_x_list, list): |
| 270 | if not XFORMERS_AVAILABLE: |
| 271 | raise AssertionError("xFormers is required for using nested tensors") |
| 272 | return self.forward_nested(x_or_x_list) |
| 273 | else: |
| 274 | raise AssertionError |
nothing calls this directly
no test coverage detected