jina-ai / clip-as-service

🏄 Scalable embedding, reasoning, ranking for images and sentences with CLIP
https://clip-as-service.jina.ai
Other
12.48k stars 2.07k forks source link

how to transform CLIP to TensorRT, ONNX, TorchScript? #878

Closed FD-Liekkas closed 1 year ago

FD-Liekkas commented 1 year ago

Could you please share the processing code of converting the original CLIP to TensorRT, ONNX, TorchScript model?

ZiniuYu commented 1 year ago

Hi, there are many tutorials online. For example

Pytorch->ONNX https://pytorch.org/tutorials/advanced/super_resolution_with_onnxruntime.html PyTorch->TorchScript https://pytorch.org/tutorials/recipes/torchscript_inference.html ONNX->TensorRT https://docs.nvidia.com/deeplearning/tensorrt/quick-start-guide/index.html