ProPainter icon indicating copy to clipboard operation
ProPainter copied to clipboard

can you convert this project to onnx ?

Open lizhiqi-coder opened this issue 1 year ago • 3 comments

can you convert this project to onnx or C++ ?

lizhiqi-coder avatar Nov 09 '24 15:11 lizhiqi-coder

+1

antithing avatar Nov 09 '24 17:11 antithing

can you convert this project to onnx or C++ ?

@lizhiqi-coder @antithing I've been trying for three working days, and I feel that the problem stems from the use of many conditional statements in Propainter's network and the torchvision::deform_conv2d operator, which isn't supported by ONNX. These factors prevent JIT tracing from capturing the entire data stream completely, ultimately causing the conversion to the ONNX model to fail.

The only solution I've found is to convert it to TorchScript and then use libtorch + pt model to make it work in C++.

I look forward to discussing any better solutions you might have in the future.

whyb avatar Nov 12 '25 06:11 whyb

@lizhiqi-coder thank you, I would like to test your c++ version if I can, would you be happy to share it?

antithing avatar Nov 12 '25 07:11 antithing