use the optimum-cli export command:   Copied optimum-cli export onnx --model runwayml/stable-diffusion-v1-5 sd_v15_onnx/ Then to perform inference (you don’t have to specify export=True again):   Copied from optimum.onnxruntime import ORTStableDiffusionPipeline