aboutsummaryrefslogtreecommitdiffstats
path: root/modules/scunet_model.py
diff options
context:
space:
mode:
authorBruno Seoane <brunoseoaneamarillo@gmail.com>2022-10-26 12:50:26 +0000
committerBruno Seoane <brunoseoaneamarillo@gmail.com>2022-10-26 12:50:26 +0000
commit8320963dcbc80e9c4cdef6124cb3cf0d246badd8 (patch)
tree8bd83cc282d2bb1ba72a06128f817412c2605439 /modules/scunet_model.py
parent2267498a8cae303ae3badc4556c61c0e84cac6ec (diff)
parent99d728b5b18829c8a6b7b2d69c9b9327dd257896 (diff)
downloadstable-diffusion-webui-gfx803-8320963dcbc80e9c4cdef6124cb3cf0d246badd8.tar.gz
stable-diffusion-webui-gfx803-8320963dcbc80e9c4cdef6124cb3cf0d246badd8.tar.bz2
stable-diffusion-webui-gfx803-8320963dcbc80e9c4cdef6124cb3cf0d246badd8.zip
Merge branch 'master' of https://github.com/AUTOMATIC1111/stable-diffusion-webui
Diffstat (limited to 'modules/scunet_model.py')
-rw-r--r--modules/scunet_model.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/modules/scunet_model.py b/modules/scunet_model.py
index 36a996bf..59532274 100644
--- a/modules/scunet_model.py
+++ b/modules/scunet_model.py
@@ -54,9 +54,8 @@ class UpscalerScuNET(modules.upscaler.Upscaler):
img = img[:, :, ::-1]
img = np.moveaxis(img, 2, 0) / 255
img = torch.from_numpy(img).float()
- img = img.unsqueeze(0).to(device)
+ img = devices.mps_contiguous_to(img.unsqueeze(0), device)
- img = img.to(device)
with torch.no_grad():
output = model(img)
output = output.squeeze().float().cpu().clamp_(0, 1).numpy()