ONNX Model Zoo

deinferno/taesd-onnx

By deinferno · ↓ 0 · ♥ 3 · Updated 2023-11-04

What's in this repo

This page lists the files in deinferno/taesd-onnx, including model.onnx and more.

  • 2 ONNX models (.onnx files)
  • 5 files, including 2 .onnx, 1 .md, 1 .py
  • Last updated 2023-11-04

ONNX files

File Size Download
vae_decoder/model.onnx — Download
vae_encoder/model.onnx — Download

How to use

These ONNX files can be loaded with ONNX Runtime. To inspect a model graph, upload the file to the Netron viewer. Download links point to the original files on Hugging Face.

README

Model Descriptions:

This repo contains ONNX model files for madebyollin's Tiny AutoEncoder for Stable Diffusion.

Using in 🧨 diffusers

To install the requirements for this demo, do pip install optimum["onnxruntime"].

from huggingface_hub import snapshot_download
from diffusers.pipelines import OnnxRuntimeModel
from optimum.onnxruntime import ORTStableDiffusionPipeline

model_id = "CompVis/stable-diffusion-v1-4"

taesd_dir = snapshot_download(repo_id="deinferno/taesd-onnx")

pipeline = ORTStableDiffusionPipeline.from_pretrained(
        model_id,
        vae_decoder_session = OnnxRuntimeModel.from_pretrained(f"{taesd_dir}/vae_decoder"),
        vae_encoder_session = OnnxRuntimeModel.from_pretrained(f"{taesd_dir}/vae_encoder"),
        revision="onnx")

prompt = "sailing ship in storm by Leonardo da Vinci"
image = pipeline(prompt).images[0]
image.save("result.png")

Model info

onnx text-to-image license:mit region:us
↓ 0 ♥ 3

Created: 2023-11-04

Updated: 2023-11-04

View on Hugging Face

Files (5)

.gitattributes
README.md
convert_to_onnx.py
vae_decoder/model.onnx ONNX
vae_encoder/model.onnx ONNX

Related models