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
[CHAINNER][CUSTOM MODELS] Models converted with chaiNNer 0.21.2 and above do not work #690
Comments
Could you send the .param file? |
|
I used caiNNer latest version 0.21.2 |
I have the same issue(s) here on Windows 10 using chaiNNer 0.21.2 and then trying them in Upscayl 2.9.9. I've seen both errors reported. No image and the "Input file is missing". In the no image after case the processing is almost instant whereas it normally takes some seconds to process. The .parameter file from chaiNNER 0.21.2 looks quite a bit different from the ones in the guide and from the .parameter files for working models. Here's a comparison of LSDIRplusC.
output from chaiNNer v0.21.2:
Does someone know which version of chaiNNer works? |
That's weird indeed. Maybe 1.20.2 would work. |
I tried a bunch of different versions and these all worked: The only one I found that doesn't work is v0.21.2 It seems to have a problem with ONNX. No matter how many times I install the ONNX dependency it still shows that it's not installed. |
@NayamAmarshe Any idea as to the difference in output noted above? |
No, sir. Maybe ONNX introduced breaking changes. I'll see if there are other ways to convert the models. |
Anyways, I've updated the documentation to mention the incompatibility with 0.21.2. Going to use this for tracking better solutions |
Came across this randomly. Just FYI, we didn't knowingly change anything on the chaiNNer side that would have affected NCNN inference (it still works fine in chaiNNer). My only assumption is that your underlying realesrgan-ncnn-vulkan code is outdated and either does not support the clip op that now gets captured by conversions (we switched from doing the clip with numpy to doing it with pytorch to improve performance and now it gets captured by torch's trace), or with the differently named layers that seems to have happened after an onnx update. Either way, this most likely needs to be fixed on the realesrgan-ncnn-vulkan side, and my guess is that updating that is out of scope for that project as it is only meant to run official models. If you want an alternative, the official ncnn package has something called PNNX (which has prebuilt binaries i think), which you could use for conversion. Those might just work out of the box and would mean your users would no longer need to rely on chaiNNer for conversion. |
Thank you for the explanation, Joey! |
My assumption is that all you'd need to do is update the NCNN submodule to latest and it should just work. But I also am not an NCNN expert so I really don't know either 😆 It is unfortunate that this broke though. If it is the clip op that is causing the issue, I'm pretty sure it can just be removed from the param, as there are no weights associated with it. You'd just have to also modify whatever else needs to be modified when you remove a layer. Last time this was brought up to me it appeared ncnn tracks the number of layers, for example, which would need to be reduced. If the problem is the names, that could be as simple as a find and replace to remove the slashes. I know this has been attempted unsuccessfully before, but I still think it's possible with some work to figure out what all needs to be changed, I just don't have the time to mess around with it myself. But if you do figure it out and think we could change something on the chaiNNer side to help compatiblity, do let me know and I can see if we can make that happen. |
I think it might be more than the clip, since several things in the new param files have changed and my assumption is, it's related to some ONNX update. I'll try to look more into it and let you know what I discover :D Thanks a lot for all the suggestions and help! |
Checklist
Describe the Issue
Hello brother, Could you update the Model Conversion Guide at https://github.com/upscayl/upscayl/wiki/Model-Conversion-Guide Please. Because it seems not working with the new version of chaiNNer.
The problem is at the final step where I need to change some text in .param file but it's not working now.
Screenshots
The text was updated successfully, but these errors were encountered: