aboutsummaryrefslogtreecommitdiff
path: root/modules/esrgan_model.py
diff options
context:
space:
mode:
authorBruno Seoane <brunoseoaneamarillo@gmail.com>2022-10-26 09:50:26 -0300
committerBruno Seoane <brunoseoaneamarillo@gmail.com>2022-10-26 09:50:26 -0300
commit8320963dcbc80e9c4cdef6124cb3cf0d246badd8 (patch)
tree8bd83cc282d2bb1ba72a06128f817412c2605439 /modules/esrgan_model.py
parent2267498a8cae303ae3badc4556c61c0e84cac6ec (diff)
parent99d728b5b18829c8a6b7b2d69c9b9327dd257896 (diff)
Merge branch 'master' of https://github.com/AUTOMATIC1111/stable-diffusion-webui
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 a49e2258..a13cf6ac 100644
--- a/modules/esrgan_model.py
+++ b/modules/esrgan_model.py
@@ -190,7 +190,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 = img.unsqueeze(0).to(devices.device_esrgan)
+ img = devices.mps_contiguous_to(img.unsqueeze(0), devices.device_esrgan)
with torch.no_grad():
output = model(img)
output = output.squeeze().float().cpu().clamp_(0, 1).numpy()