--- license: mit pipeline_tag: text-to-image tags: - onnx - text-to-image inference: false --- ## Model Descriptions: This repo contains ONNX model files for [madebyollin's Tiny AutoEncoder for Stable Diffusion](https://huggingface.co/madebyollin/taesd). ## Using in 🧨 diffusers To install the requirements for this demo, do pip install optimum["onnxruntime"]. ```python from optimum.onnxruntime import ORTStableDiffusionPipeline model_id = "CompVis/stable-diffusion-v1-4" pipeline = ORTStableDiffusionPipeline.from_pretrained(model_id, revision="onnx") # Inject TAESD taesd_id = "deinferno/taesd-onnx" pipeline.vae_decoder = OnnxRuntimeModel.from_pretrained(taesd_id, subfolder = "vae_decoder") pipeline.vae_encoder = OnnxRuntimeModel.from_pretrained(taesd_id, subfolder = "vae_encoder") prompt = "sailing ship in storm by Leonardo da Vinci" image = pipeline(prompt).images[0] output.save("result.png") ```