-
Notifications
You must be signed in to change notification settings - Fork 460
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SDXL ORT base example produces broken images on Windows 10 #1310
Comments
Thank you, will have a look asap! |
@bzlibby I can not reproduce the issue on CUDA EP on Linux. I have to say I'm not super keen to run on CPU EP because it is super slow (I'll try next week). from optimum.onnxruntime import ORTStableDiffusionXLPipeline
model_id = "stabilityai/stable-diffusion-xl-base-1.0"
base = ORTStableDiffusionXLPipeline.from_pretrained(model_id, provider="CUDAExecutionProvider")
prompt = "sailing ship in storm by Leonardo da Vinci"
print("start inference")
image = base(prompt).images[0]
image.save("./sdxl-test.png") getting: Could you maybe try updating optimum to 1.12? Could you try to run on CUDA EP to see if the issue is there as well? You would need to install |
Hi, I can reproduce this as well, with very similar results. Notably, I also have a Linux test machine with both the CUDA and ROCm providers set up, and I cannot reproduce the issue there. This is specific to Windows. I'm using:
@bzlibby originally found this while helping me test SDXL support for my ONNX tool, which is primarily used by people on Windows machines with AMD video cards, where the CUDA provider is not available. I understand that using the CPU provider is very slow, but I wanted to rule out issues with the AMD drivers or DirectML, and CPU is the fallback provider for ORT. We are both able to reproduce the issue using the pre-converted model on HF hub and the example from the documentation, no other code needed. This does not happen on Linux on any version of |
Yes that's bad. Is the issue only with SDXL or e.g. with SD 1.2 as well? As soon as I can get my hands on a Windows machine I can have a look. It could possibly be a bug in ORT. |
@fxmarty I updated optimum like you suggested and tested both SDXL and SD 1.5 (I didn't see an example in the documentation for 1.2, but I can test that too if it'd be helpful!) - I'm getting the same results with SDXL still, but SD 1.5 worked just fine for me: from optimum.onnxruntime import ORTStableDiffusionPipeline
model_id = "runwayml/stable-diffusion-v1-5"
pipeline = ORTStableDiffusionPipeline.from_pretrained(model_id, revision="onnx")
prompt = "sailing ship in storm by Leonardo da Vinci"
image = pipeline(prompt).images[0]
image.save("../outputs/sdxl-test.png") using:
|
System Info
OS: Windows 10 Home 22H2 (Build 19045.3324)
Python 3.10.6
pip list --local
Who can help?
@JingyaHuang, @echarlaix
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction (minimal, reproducible, runnable)
I was using this snippet from the documentation for SDXL:
and got this output:
I originally ran into this while trying to use SDXL with onnx-web, but was able to reproduce it with the above example and the model that you've already converted. I tried it with the DirectML provider as well and get similar results.
Expected behavior
I would expect to get a picture of a boat, similar to the one from the documentation:
The text was updated successfully, but these errors were encountered: