I think the step 2 here is probably wrong, you should not trace a quantized model before swapping it in? You can swap a quantized backbone model in first, then do onnx export, there’s no need to do explicit tracing as ONNX export will do it underlying.