(self, x_or_x_list)
| 247 | return attn_bias.split(x) |
| 248 | |
| 249 | def forward(self, x_or_x_list): |
| 250 | if isinstance(x_or_x_list, Tensor): |
| 251 | return super().forward(x_or_x_list) |
| 252 | elif isinstance(x_or_x_list, list): |
| 253 | if not XFORMERS_AVAILABLE: |
| 254 | raise AssertionError("xFormers is required for using nested tensors") |
| 255 | return self.forward_nested(x_or_x_list) |
| 256 | else: |
| 257 | raise AssertionError |
| 258 | |
| 259 | class BlockRope(nn.Module): |
| 260 | def __init__( |
nothing calls this directly
no test coverage detected