Based on the error message it seems as if you are trying to load a traced model onto the GPU while your libtorch build doesn’t support the CUDA backend. Make sure to install the libtorch version built with CUDA or build it from source using CUDA.