aboutsummaryrefslogtreecommitdiffstats
path: root/modules/esrgan_model.py
diff options
context:
space:
mode:
authorbrkirch <brkirch@users.noreply.github.com>2022-11-08 00:25:43 +0000
committerbrkirch <brkirch@users.noreply.github.com>2022-11-17 05:08:21 +0000
commitabfa22c16fb3d9b1ed8d049c7b68e94d1cca5b82 (patch)
treef2e1ef625405fc93408d15dea3d092c7398f4a19 /modules/esrgan_model.py
parent98947d173e3f1667eba29c904f681047dea9de90 (diff)
downloadstable-diffusion-webui-gfx803-abfa22c16fb3d9b1ed8d049c7b68e94d1cca5b82.tar.gz
stable-diffusion-webui-gfx803-abfa22c16fb3d9b1ed8d049c7b68e94d1cca5b82.tar.bz2
stable-diffusion-webui-gfx803-abfa22c16fb3d9b1ed8d049c7b68e94d1cca5b82.zip
Revert "MPS Upscalers Fix"
This reverts commit 768b95394a8500da639b947508f78296524f1836.
Diffstat (limited to 'modules/esrgan_model.py')
-rw-r--r--modules/esrgan_model.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/esrgan_model.py b/modules/esrgan_model.py
index c61669b4..9a9c38f1 100644
--- a/modules/esrgan_model.py
+++ b/modules/esrgan_model.py
@@ -199,7 +199,7 @@ def upscale_without_tiling(model, img):
img = img[:, :, ::-1]
img = np.ascontiguousarray(np.transpose(img, (2, 0, 1))) / 255
img = torch.from_numpy(img).float()
- img = devices.mps_contiguous_to(img.unsqueeze(0), devices.device_esrgan)
+ img = img.unsqueeze(0).to(devices.device_esrgan)
with torch.no_grad():
output = model(img)
output = output.squeeze().float().cpu().clamp_(0, 1).numpy()