Skip to content
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

Non-zero status code returned while running Add node. Name:'Add_221' #20861

Open
imranypatel opened this issue May 30, 2024 · 1 comment
Open
Labels
ep:DML issues related to the DirectML execution provider model:transformer issues related to a transformer model: BERT, GPT2, Hugging Face, Longformer, T5, etc. platform:windows issues related to the Windows platform stale issues that have not been addressed in a while; categorized by a bot

Comments

@imranypatel
Copy link

Describe the issue

While trying Basic Stable Diffusion Example of https://www.nuget.org/packages/OnnxStack.StableDiffusion, at the following line in the code:

    // Run Pipleine
    var result = await pipeline.GenerateImageAsync(promptOptions);

Following exception is raised:

Microsoft.ML.OnnxRuntime.OnnxRuntimeException
  HResult=0x80131500
  Message=[ErrorCode:RuntimeException] Non-zero status code returned while running Add node. Name:'Add_221' Status Message: D:\a\_work\1\s\onnxruntime\core\providers\dml\DmlExecutionProvider\src\MLOperatorAuthorImpl.cpp(2482)\onnxruntime.DLL!00007FFC280E7AA5: (caller: 00007FFC280E712D) Exception(3) tid(1b6c) 80004005 Unspecified error

  Source=Microsoft.ML.OnnxRuntime
  StackTrace:
   at Microsoft.ML.OnnxRuntime.NativeApiStatus.VerifySuccess(IntPtr nativeStatus)
   at Microsoft.ML.OnnxRuntime.InferenceSession.<>c__DisplayClass75_0.<RunAsync>b__0(IReadOnlyCollection`1 outputs, IntPtr status)
--- End of stack trace from previous location ---
   at Microsoft.ML.OnnxRuntime.InferenceSession.<RunAsync>d__75.MoveNext()
   at OnnxStack.StableDiffusion.Pipelines.StableDiffusionPipeline.<EncodePromptTokensAsync>d__39.MoveNext()
   at OnnxStack.StableDiffusion.Pipelines.StableDiffusionPipeline.<GeneratePromptEmbedsAsync>d__40.MoveNext()
   at OnnxStack.StableDiffusion.Pipelines.StableDiffusionPipeline.<CreatePromptEmbedsAsync>d__37.MoveNext()
   at OnnxStack.StableDiffusion.Pipelines.StableDiffusionPipeline.<RunInternalAsync>d__31.MoveNext()
   at OnnxStack.StableDiffusion.Pipelines.StableDiffusionPipeline.<GenerateImageAsync>d__26.MoveNext()
   at TestOnnxStack.TestStableDiffusion.<Test01>d__1.MoveNext() in ...\TestOnnxStack\TestStableDiffusion.cs:line 42
   at Program.<<Main>$>d__0.MoveNext() in ...i\TestOnnxStack\Program.cs:line 6

To reproduce

  1. Create .net8 console project
  2. Add nuget package microsoft.ml.onnxruntime.directml (1.17.3) and onnxstack.stablediffusion (0.31.0)
  3. Copy code in Program.cs from Basic Stable Diffusion Example of https://www.nuget.org/packages/OnnxStack.StableDiffusion documentation.
  4. create d:\model folder to git clone https://huggingface.co/runwayml/stable-diffusion-v1-5 -b onnx
  5. change path to model in code e.g. var pipeline = StableDiffusionPipeline.CreatePipeline(@"D:\model\stable-diffusion-v1-5");

Urgency

Low.

Platform

Windows

OS Version

10

ONNX Runtime Installation

Released Package

ONNX Runtime Version or Commit ID

1.17.3

ONNX Runtime API

C#

Architecture

X64

Execution Provider

DirectML

Execution Provider Library Version

Microsoft.ML.OnnxRuntime.DirectML 1.17.3, Microsoft.AI.DirectML 1.13.1

@github-actions github-actions bot added ep:DML issues related to the DirectML execution provider model:transformer issues related to a transformer model: BERT, GPT2, Hugging Face, Longformer, T5, etc. platform:windows issues related to the Windows platform labels May 30, 2024
Copy link
Contributor

This issue has been automatically marked as stale due to inactivity and will be closed in 30 days if no further activity occurs. If further support is needed, please provide an update and/or more details.

@github-actions github-actions bot added the stale issues that have not been addressed in a while; categorized by a bot label Jun 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ep:DML issues related to the DirectML execution provider model:transformer issues related to a transformer model: BERT, GPT2, Hugging Face, Longformer, T5, etc. platform:windows issues related to the Windows platform stale issues that have not been addressed in a while; categorized by a bot
Projects
None yet
Development

No branches or pull requests

1 participant