stochasticai / x-stable-diffusion

Real-time inference for Stable Diffusion - 0.88s latency. Covers AITemplate, nvFuser, TensorRT, FlashAttention. Join our Discord communty: https://discord.com/invite/TgHXuSJEk6
https://stochastic.ai
Apache License 2.0
553 stars 35 forks source link

unet Onnx file issue? #35

Open TalhaUsuf opened 1 year ago

TalhaUsuf commented 1 year ago

Your colab example is working perfectly well. I am able to convert all onnx models to tensorrt engines with slight modification. But when i generate onnx file for unet model using the default diffusers onnx export script, that onnx file is not convertible with the colab notebook you provided. I have also tested on my own pc with RTX-3090.

So my question is how did you generate the onnx file for unet (that you used in colab tutorial)?

Toan-Do commented 1 year ago

Hi @TalhaUsuf , we used the onnx files from HuggingFace hub which are converted from this repo. You can reference this repo to convert Pytorch to Onnx. Another option is to use TensorRT like this example.

Let us know if you need any more information.