Thans for your help @ptrblck
I have finally found a way to do so.
As you said,  my model was indeed not traced and this is what led to the error.
I used this repos to transform my onnx module to a pytorch traced module with the following unfininshed-but-you-get-the-idea script that converts onnx to pth and trace the pth model.
(note : this code requires that you have a “torch” folder in your current folder to work well.
I have a current folder that looked like this :

onnx2torch.py
torch (where torch output models are stored)
onnx  (where onnx input models are stored)
)

#onnx2torch.py
import onnx
from onnx2pytorch import ConvertModel
import sys , os
import torch
import numpy as np

def main(argv):
    path_to_onnx = sys.argv[1]
    size = [1,3,384,288] # sys.argv[2]
    #size = np.fromstring(size, dtype=int, sep=',')
    print(size)

    torch_file = path_to_onnx[ path_to_onnx.find('/') :path_to_onnx.find('.') ] + ".pth"
    path_to_torch = os.path.join("torch" , torch_file)
    path_to_torch = "torch" + path_to_torch
    print(f"load path = {path_to_onnx}")
    print(f"save_path = {path_to_torch}")

    onnx_model = onnx.load(path_to_onnx)
    pytorch_model = ConvertModel(onnx_model)

    # An example input you would normally provide to your model's forward() method.
    dummy_input = torch.ones(size)

    # Use torch.jit.trace to generate a torch.jit.ScriptModule via tracing.
    traced_script_module = torch.jit.trace(pytorch_model, dummy_input)
    traced_script_module.save(path_to_torch)
    print("saved")
    return


if __name__ == "__main__" :
    main(sys.argv)