Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Black output image using 4x_NMKD-Superscale-SP_178000_G #2138

Closed
reijin90 opened this issue Aug 23, 2023 · 7 comments · Fixed by #2143
Closed

Black output image using 4x_NMKD-Superscale-SP_178000_G #2138

reijin90 opened this issue Aug 23, 2023 · 7 comments · Fixed by #2143
Labels
bug Something isn't working

Comments

@reijin90
Copy link

reijin90 commented Aug 23, 2023

Information:

  • Chainner version: chaiNNer 0.19.3
  • OS: macOS 12.6.7 (M1)

Description
Upscaling images with 4x_NMKD-Superscale-SP_178000_G.pth or 4x_NMKD-SuperscaleV2_46k.pth result in a black output image.
Update1: I tested with both fp16 mode enabled and disabled, same result. I ran the chain in CPU mode and it properly produced an image. So it is probably acceleration related. I re-installed pytorch, but still black images outside of CPU mode. Is there an other upscaler system I should use instead of pytorch?

Logs
https://www.dropbox.com/scl/fi/ksm8lhyxvik0pmumjc7a1/chainner_logs.zip?rlkey=vj9fategc42z1uu36miul0j1w&dl=0

Project:
upscale.chn.zip

Models:
https://nmkd.de/shared/ESRGAN/Models/Realistic%2C%20Multipurpose/4x_NMKD-Superscale-SP_178000_G.pth
https://nmkd.de/shared/ESRGAN/Models/Realistic%2C%20Multipurpose/4x_NMKD-SuperscaleV2_46k.pth

@reijin90 reijin90 added the bug Something isn't working label Aug 23, 2023
@joeyballentine
Copy link
Member

I don't see anything in the logs that would indicate an issue, but just to check: do you have fp16 mode enabled? If you do, try disabling it. If that doesn't do anything, we might need @stonerl's help since this is probably a macos issue

@reijin90
Copy link
Author

reijin90 commented Aug 24, 2023

I had it enabled, but only as a test to see if it works when enabled. I disabled it, restarted the tool and it is still producing black images.
Updated the main question.

@stonerl

This comment was marked as outdated.

@stonerl
Copy link
Collaborator

stonerl commented Aug 24, 2023

@joeyballentine found the issue. We need to upgrade to PyTorch 2, at least on Apple Silicon.

@stonerl
Copy link
Collaborator

stonerl commented Aug 24, 2023

@reijin90 I made a test build for Apple Silicon that uses PyTorch 2.0.1 and TorchVision 0.15.2. You can download it from here:

https://www.dropbox.com/scl/fo/262tme9vznofa0wjt2j1e/h?rlkey=vt8vlbilkz4ant18sbrj9s01b&dl=0

Upgrade the dependencies and run your chain again.

@joeyballentine
Copy link
Member

Well we wanna switch to 2 anyway in general so I guess I'll prioritize that

@reijin90
Copy link
Author

works perfectly @stonerl , thank you! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
3 participants