Real-ESRGAN
Real-ESRGAN copied to clipboard
Visual artefacts present in upscaled images when device is set to 'mps'
To see the code, please refer to: https://github.com/ericpesto/stable-diffusion-mac-background-image-generator/blob/b1b14ea9b7fbefd1976478f4becfd5d529b2a956/main.py#L66-L74
+1. I'm having the same problem. Did you find out how to solve it?
Found a solution when using mps: Inside the folder RealESRGAN in the main.py, you must first call cpu() and then clamp.
Code in the repo line 77:
sr_image = res.permute((0,2,3,1)).clamp_(0, 1).cpu()
New code:
sr_image = res.permute((0,2,3,1)).cpu().clamp_(0,1)