-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Transparent images lose alpha channel #1365
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
Comments
This is because the current models take and output RGB24 images. This is just not possible AFAIK. |
Specifically here: Line 90 in 6bf0ee5
I needed BGR24 to create the |
Thanks for the reply! For other people with this problem, I ended up using xinntao/Real-ESRGAN-ncnn-vulkan directly with the models included in this project and it handled the alpha channel well. I wanted to check if it's easy to support the same thing in this project, but given that it's not possible I'll just close this issue. |
I think it could be possible if I end up using libtorch instead of ncnn. It's something I can look out for down the road. |
Is ncnn the problem here though? Asking because I was able to use xinntao/Real-ESRGAN-ncnn-vulkan directly and it did handle alpha channel properly. |
Hmm maybe I missed something here? Can you please reopen the issue? I'll take a look when I have time. |
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
video2x works fine on upscaling plain BMP files, but drops the alpha channel for PNG files with alpha channel.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The alpha channel is kept and upscaled in the output PNG.
Actual behavior
The alpha channel is lost in the output PNG.
Screenshots
Environment:
Windows 10 22H2
NVIDIA GeForce RTX 3080
6.4.0
Full command
Additional context
I tried specifying
--pix-fmt rgba
as in #457 (which was for waifu2x back in 2021), but it didn't work either, probably because it's for output instead of input.The text was updated successfully, but these errors were encountered: