Closed Siziff closed 7 months ago
I wrote a guide here. It is more complicated than just using torch.onnx
.
@styler00dollar @TNTwise I follow all the instructions, but I get an error. How did you fix this error? I get this error in both solutions.
TypeError: upsample_bilinear2d() received an invalid combination of arguments - got (Tensor, NoneType, bool, list), but expected one of:
* (Tensor input, tuple of ints output_size, bool align_corners, tuple of floats scale_factors)
didn't match because some of the arguments have invalid types: (Tensor, NoneType, bool, list)
* (Tensor input, tuple of ints output_size, bool align_corners, float scales_h, float scales_w, *, Tensor out)
Did you replace x with im0,img1
Yes, everything is as in the instructions @TNTwise
Are you using that specific torch version? It needs the one from the instructions to work with onnx export.
You can also use my script here on rife-v4.14 and compare to how you are exporting. You may need to download config.txt as well. https://github.com/TNTwise/ConvertRIFEtoNCNN-githubactions/blob/main/modify_train_log.py
@TNTwise thanks a lot for the script, I get the once file, but when I try to convert it to ncnn I get an error Cast not supported yet! # to=1
. If I use a sim, the model is converted to ncnn with no errors, BUT when I add these models to the rife-ncnn-vulkan project and try to launch it, I get a black picture. What could be the problem?
It's worth noting that when I run models from here, everything works correctly..
You need to run it through onnxsim to remove cast. You can also try pnnx conversion to see if that works. Make sure you compile rife ncnn vulkan with memorydata and convolutiondepthwise. Also check that the naming of your folder is right, it has to be rife-v4-something.
HI, can smb please explain how to convert the new Rife model from hzwer/Practical-RIFLE to ncnn format? I've tried to use:
BUT NONE OF THEM WORKS. The models I received do not run in the Vulkan app on my phone. but I run models from this project that @styler00dollar converted. Can someone explain how to convert models correctly?