ion-v1-5"
pipe = ORTStableDiffusionPipeline.from_pretrained(model_id, export=True)
prompt = "a photo of an astronaut riding a horse on mars"
images = pipe(prompt).images[0]
pipe.save_pretrained("./onnx-stable-diffusion-v1-5")
If you want to export the pipeline in the ONNX format offline and later use it for inference,
you can use the optimum-cli export command: 


	Copied
optimum-cli export onnx --model runwayml/stable-diffusion-v1-5 sd_v15_onn