From f29b4cd7cb4d59c8e4dcac1cebb63bfb5b884395 Mon Sep 17 00:00:00 2001 From: yajun Date: Wed, 23 Aug 2023 14:31:38 +0800 Subject: [PATCH] tell RealESRGANer which device to run on, could be cuda, M1, or other GPU --- modules/realesrgan_model.py | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/realesrgan_model.py b/modules/realesrgan_model.py index 0700b8537..02841c302 100644 --- a/modules/realesrgan_model.py +++ b/modules/realesrgan_model.py @@ -55,6 +55,7 @@ class UpscalerRealESRGAN(Upscaler): half=not cmd_opts.no_half and not cmd_opts.upcast_sampling, tile=opts.ESRGAN_tile, tile_pad=opts.ESRGAN_tile_overlap, + device=self.device, ) upsampled = upsampler.enhance(np.array(img), outscale=info.scale)[0]