Closed slk333 closed 1 year ago
Is there more output? A complete traceback would be helpful...
This happens because it detects that you have a CPU and won't load the upscaler: https://github.com/lstein/stable-diffusion/blob/main/ldm/gfpgan/gfpgan_tools.py#L78
This happens because it detects that you have a CPU and won't load the upscaler: https://github.com/lstein/stable-diffusion/blob/main/ldm/gfpgan/gfpgan_tools.py#L78
Thanks, I think support for the upscaler is really important. I hope the macos fork will support it soon
@lstein @magnusviri
How about using realesrgan-ncnn-vulkan
? https://github.com/xinntao/Real-ESRGAN/releases
This is from Prog Rock Stable and it works on M1
def esrgan_resize(input, id):
input.save(f'_esrgan_orig{id}.png')
try:
subprocess.run(
['./realesrgan-ncnn-vulkan', '-i', '_esrgan_orig.png', '-o', '_esrgan_.png'],
stdout=subprocess.PIPE
).stdout.decode('utf-8')
output = Image.open('_esrgan_.png').convert('RGBA')
return output
except Exception as e:
print('ESRGAN resize failed. Make sure realesrgan-ncnn-vulkan is in your path (or in this directory)')
print(e)
quit()
Yep. That works for me if I run it separately on my M1 Pro. Mind that it segfaults when it can't find the model files.
it is now working (even though it does not run on MPS yet). closing this issue
Hi, on Apple M1, Upscaler is not working: