diff options
author | papuSpartan <30642826+papuSpartan@users.noreply.github.com> | 2022-10-31 15:08:54 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-31 15:08:54 -0500 |
commit | 25de9df3648f6d936ec7dbbb91c6c04bc3939a62 (patch) | |
tree | 8dbf732357d5ed094350827aff4caa7741f5a4cc /modules/scunet_model.py | |
parent | ce42879438bf2dbd76b5b346be656292e42ffb2b (diff) | |
parent | 5c9b3625fa03f18649e1843b5e9f2df2d4de94f9 (diff) |
Merge branch 'AUTOMATIC1111:master' into master
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() |