diff options
author | zhaohu xing <32668889+920232796@users.noreply.github.com> | 2022-11-30 02:13:17 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-30 02:13:17 +0000 |
commit | 0831ab476c626eb796b609acf8771177692bfab7 (patch) | |
tree | ebae98ea40ecc5b34497424bee19310e9fac4068 /modules/esrgan_model.py | |
parent | ee3f5ea3eeb31f1ed72e2f0cbed2c00a782497d8 (diff) | |
parent | 4b3c5bc24bffdf429c463a465763b3077fe55eb8 (diff) | |
download | stable-diffusion-webui-gfx803-0831ab476c626eb796b609acf8771177692bfab7.tar.gz stable-diffusion-webui-gfx803-0831ab476c626eb796b609acf8771177692bfab7.tar.bz2 stable-diffusion-webui-gfx803-0831ab476c626eb796b609acf8771177692bfab7.zip |
Merge branch 'master' into master
Diffstat (limited to 'modules/esrgan_model.py')
-rw-r--r-- | modules/esrgan_model.py | 2 |
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()
|