If you want to export to ONNX, nothing on that workflow changes. Tracing / Scripting has slightly different semantics from ONNX export, because ONNX needs statically known shapes of all inputs / intermediates, while TorchScript / jit.trace erase that information in the stored graph.