looks like the quantized torchscript is not playing well with the autograd, try running without gradient
with torch.no_grad():
_ = trace_model(torch.rand(1,3,300,300))
otherwise not sure, if you can give a minimal repro that would help.