mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-08-04 11:12:35 +00:00
@@ -94,12 +94,3 @@ def autocast(disable=False):
|
||||
return contextlib.nullcontext()
|
||||
|
||||
return torch.autocast("cuda")
|
||||
|
||||
|
||||
# MPS workaround for https://github.com/pytorch/pytorch/issues/79383
|
||||
def mps_contiguous(input_tensor, device):
|
||||
return input_tensor.contiguous() if device.type == 'mps' else input_tensor
|
||||
|
||||
|
||||
def mps_contiguous_to(input_tensor, device):
|
||||
return mps_contiguous(input_tensor, device).to(device)
|
||||
|
Reference in New Issue
Block a user