Files
room_glitch/labs/glitch_odin/export_teddy.py
T

9 lines
344 B
Python

"""Export Piper with its legacy dynamic-axis ONNX exporter on newer PyTorch."""
import functools
import torch
from piper.train.export_onnx import main
# Piper's exporter specifies dynamic_axes/opset 15 and predates the dynamo default.
torch.onnx.export = functools.partial(torch.onnx.export, dynamo=False)
if __name__ == "__main__":
main()