If you can convert your model to a format supported by mediapipe, that’s the easiest solution. I’ve toyed around with writing a calculator for mediapipe supporting pytorch here: https://github.com/dsuess/mediapipe-pytorch 158. It’s just a very basic setup, but it can easily be extended and refactored into separate modules for tensor conversion, inference, etc.
The biggest challenge I ran into is the build environment: pytorch has a bazel environment for linux, so that’s not too hard to get working. However, as far as I can tell, you need to use cmake for the Android/iOS builds, so that’s more challenging. What finally stopped me is the lack of GPU support on mobile in pytorch ATM.