Skip to content

Commit

Permalink
Fix PEP448 for python < 3.8 (#527)
Browse files Browse the repository at this point in the history
Co-authored-by: danthe3rd <danthe3rd@users.noreply.github.com>
  • Loading branch information
danthe3rd and danthe3rd authored Nov 14, 2022
1 parent 8367685 commit b8e686f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xformers/ops/unbind.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def forward(ctx, dim: int, *tensors: torch.Tensor):
@classmethod
# type: ignore
def backward(cls, ctx, grad: torch.Tensor):
return None, *grad.unbind(dim=ctx.dim)
return None, *(grad.unbind(dim=ctx.dim))


def unbind(x: torch.Tensor, dim: int) -> Tuple[torch.Tensor, ...]:
Expand Down

0 comments on commit b8e686f

Please sign in to comment.