I’m unsure which model you are using from the linked repository (or rather which submodules are used in your model), but would assume that e.g. this code 1 is performing the inference in Python?
If so, you could check which utility methods are needed and try to adapt them in libtorch.