aboutsummaryrefslogtreecommitdiff
path: root/modules/devices.py
diff options
context:
space:
mode:
authorbrkirch <brkirch@users.noreply.github.com>2023-01-28 00:20:30 -0500
committerbrkirch <brkirch@users.noreply.github.com>2023-01-28 04:16:27 -0500
commitf9edd578e9e29d160e6d56038bb368dc49895d64 (patch)
tree528cb1fe752fb18da535801350cc0080890d9eca /modules/devices.py
parent02b8b957d763d0fc29551d13d8a2005615e8ce7a (diff)
Remove MPS fix no longer needed for PyTorch
The torch.narrow fix was required for nightly PyTorch builds for a while to prevent a hard crash, but newer nightly builds don't have this issue.
Diffstat (limited to 'modules/devices.py')
-rw-r--r--modules/devices.py3
1 files changed, 0 insertions, 3 deletions
diff --git a/modules/devices.py b/modules/devices.py
index 0100e4af..be542f8f 100644
--- a/modules/devices.py
+++ b/modules/devices.py
@@ -201,6 +201,3 @@ if has_mps():
cumsum_needs_bool_fix = not torch.BoolTensor([True,True]).to(device=torch.device("mps"), dtype=torch.int64).equal(torch.BoolTensor([True,False]).to(torch.device("mps")).cumsum(0))
torch.cumsum = lambda input, *args, **kwargs: ( cumsum_fix(input, orig_cumsum, *args, **kwargs) )
torch.Tensor.cumsum = lambda self, *args, **kwargs: ( cumsum_fix(self, orig_Tensor_cumsum, *args, **kwargs) )
- orig_narrow = torch.narrow
- torch.narrow = lambda *args, **kwargs: ( orig_narrow(*args, **kwargs).clone() )
-