diff options
author | Bruno Seoane <brunoseoaneamarillo@gmail.com> | 2022-10-26 12:50:26 +0000 |
---|---|---|
committer | Bruno Seoane <brunoseoaneamarillo@gmail.com> | 2022-10-26 12:50:26 +0000 |
commit | 8320963dcbc80e9c4cdef6124cb3cf0d246badd8 (patch) | |
tree | 8bd83cc282d2bb1ba72a06128f817412c2605439 /modules/scunet_model.py | |
parent | 2267498a8cae303ae3badc4556c61c0e84cac6ec (diff) | |
parent | 99d728b5b18829c8a6b7b2d69c9b9327dd257896 (diff) | |
download | stable-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.py | 3 |
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() |