bes-dev / stable_diffusion.openvino

Apache License 2.0
1.54k stars 205 forks source link

`Error`: Solution required to convert onnx model to use in the pipeline #109

Closed lalith-mcw closed 1 year ago

lalith-mcw commented 1 year ago

Solution required to convert onnx model to use the same in the pipeline:

Converted this onnx model to openvino-IR using the following option https://huggingface.co/CompVis/stable-diffusion-v1-4/tree/onnx/unet

mo.py --use_legacy_frontend --input_model onnx\model.onnx --static_shape --disable_fusing

image

Got the following error when used the same model while execution of the following line https://github.com/bes-dev/stable_diffusion.openvino/blob/72d3ad67f078b25bc5ae191f6e49078cebd1f791/stable_diffusion_engine.py#L41

Updated this statement to use the optimized openvino-IR here instead of hubface_download https://github.com/bes-dev/stable_diffusion.openvino/blob/72d3ad67f078b25bc5ae191f6e49078cebd1f791/stable_diffusion_engine.py#L37

Found the files here but still wanted to check the correctness of any updated model(Stable-Diffusion-v1.5 or v2.0) - just testing it with default model: https://huggingface.co/bes-dev/stable-diffusion-v1-4-openvino/tree/main

Could someone help here, Thanks in advance

saikrishna2893 commented 1 year ago

@bes-dev can you share your thoughts on above issue

ClashSAN commented 1 year ago

https://huggingface.co/ShadowPower/waifu-diffusion.openvino/discussions/1

maybe old onnx conversion worked differently? I also fail to convert (new) onnx unet so i was trying the older method as your files look different. https://huggingface.co/ShadowPower/waifu-diffusion-v1-3-onnx/blob/main/unet.tar.zst