Visual artefacts present in upscaled images when device is set to 'mps'
ericpesto opened this issue · comments
Eric Petsopoulos commented
Emiliano commented
+1. I'm having the same problem. Did you find out how to solve it?
Emiliano commented
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)
Eric Petsopoulos commented
Can confirm, works for me too, nice find!
*I had to make the change in models.py