audio_img / test.py
pengdaqian
add more
171f55b
raw
history blame
318 Bytes
from optimum.onnxruntime import ORTStableDiffusionPipeline
model_id = "eatdianatoday/yiwu"
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("/root/autodl-tmp/onnx-novelai-diffusion")