xinntao / Real-ESRGAN

Real-ESRGAN aims at developing Practical Algorithms for General Image/Video Restoration.
BSD 3-Clause "New" or "Revised" License
28.45k stars 3.57k forks source link

Mac M3 using only CPU #798

Open Vignesh-786 opened 6 months ago

Vignesh-786 commented 6 months ago

I'm running RealESRGAN on my Mac M3. While I suspect it's currently using the CPU, is there a way to leverage the M3's GPU or the neural engine for faster processing?

jakubbober commented 6 months ago

Remove/comment out lines 48-52 in realesrgan/utils.py and right below add self.device = torch.device("mps").