styler00dollar / VSGAN-tensorrt-docker

Using VapourSynth with super resolution and interpolation models and speeding them up with TensorRT.
BSD 3-Clause "New" or "Revised" License
286 stars 30 forks source link

model conversion from onnx to trt #9

Closed deism closed 2 years ago

deism commented 2 years ago

@styler00dollar this is not issue but a question, I read the scripts in inference.py and found real-esrgan 2x is loaded from trt engine file, since real-2x uses dynamic shapes as input, could you share any ideas how to convert this model to trt, thanks!

styler00dollar commented 2 years ago

RealESRGAN 2x is a custom model I currently train and it is not public yet. I added it to benchmarks out of data curiosity. The official 2x models do not work with TensorRT, because it does not support pixel unshuffle. 2x and 4x differ in implementation in the current official repository. I have some slightly different implementation in my custom model (using old esrgan arch instead) to make it compatible again. I hope that answers your question. If yes then I can close the issue. You can use the official 4x models instead If you want to use the RealESRGAN models.

deism commented 2 years ago

Thanks!

styler00dollar commented 2 years ago

I was approached by tepete and he seemingly found a workaround to get RealESRGAN_x2plus working. image I did not test it myself, but this might help.