(self, x_or_x_list)
| 237 | return attn_bias.split(x) |
| 238 | |
| 239 | def forward(self, x_or_x_list): |
| 240 | if isinstance(x_or_x_list, Tensor): |
| 241 | return super().forward(x_or_x_list) |
| 242 | elif isinstance(x_or_x_list, list): |
| 243 | if not XFORMERS_AVAILABLE: |
| 244 | raise AssertionError("xFormers is required for using nested tensors") |
| 245 | return self.forward_nested(x_or_x_list) |
| 246 | else: |
| 247 | raise AssertionError |
nothing calls this directly
no test coverage detected