Closed elephantpanda closed 1 year ago
Please, take a look here first.
Please, take a look here first.
Hi thanks, No I don't think this is the problem. It is definitely finding the latest DirectML.dll version 1.10.0 (because before I put that dll in the folder none of the other onnx's would load either).
All the other onnx's work fine with DirectML, it is just this specific unet.onnx which fails.
Seems more similar to this problem and this problem although neither are quite the same.
Is this more likely to be a problem with onnxruntime.dll or the onnx file itself? Could it have been exported wrongly with the wrong dimensions for the input tensors??? Although people claimed to have built it using openvino.
Edit: I have converted by own stable diffusion onnx files from the huggingface diffuser files. And it seems to work.
So it could mean that those other onnx files just don't work. I don't know.
Paul, I know Pat's been working on a number of improvements/issues lately. Does Stable Diffusion 1.5 with ort-nightly-directml 1.15.0.dev20230301008 work for you? I ran this version https://huggingface.co/runwayml/stable-diffusion-v1-5/tree/onnx/unet locally (NVidia GeForce RTX 3070 Ti) after converting weights to float16, and used the diffusers pipeline mentioned here https://www.travelneil.com/stable-diffusion-windows-amd.html.
Paul, I know Pat's been working on a number of improvements/issues lately. Does Stable Diffusion 1.5 with ort-nightly-directml 1.15.0.dev20230301008 work for you? I ran this version https://huggingface.co/runwayml/stable-diffusion-v1-5/tree/onnx/unet locally (NVidia GeForce RTX 3070 Ti) after converting weights to float16, and used the diffusers pipeline mentioned here https://www.travelneil.com/stable-diffusion-windows-amd.html.
Hi I got it working by converting the files to onnx using the python script instead of using the onnx files on hugging face.
Then I converted the python code to c sharp to run it
Describe the issue
I tried to create an inference session unet.onnx from here I get an error (The other onnx from this link work fine):
When trying to load with DirectML I get the error: ( The parameter is incorrect.)
The session loads in CPU mode. But when I run the inference I get:
My nuget packages are: DirectML.1.10.0 OnnxRuntime.DirectML.1.13.1 OnnxRuntime.Managed.1.13.1
using netstandard2.0
I am running it on a Shadow PC with Nvidia Quadro P5000. I am using the Unity 3D engine. (12GB RAM)
From looking at other similar problems, it seems like it may be a problem with the onnxruntime.dll for DirectML. That is my guess.
I'm assuming the onnx is fine because it is four months old.
To reproduce
Using the onnx managed runtime for c#. Try to create InferenceSession for unet.onnx.
BTW I am using Unity if that makes a difference. It shouldn't.
Urgency
moderate.
Platform
Windows
OS Version
Windows 10
ONNX Runtime Installation
Released Package
ONNX Runtime Version or Commit ID
1.13.1
ONNX Runtime API
C#
Architecture
X64
Execution Provider
DirectML
Execution Provider Library Version
1.10.0