Babyhamsta / Aimmy

Universal Second Eye for Gamers with Impairments (Universal AI Aim Aligner - ONNX/YOLOv8 - C#)
Other
807 stars 327 forks source link

ONNX runtime "The parameter is incorrect" #1445

Closed callmejaf closed 1 month ago

callmejaf commented 1 month ago

I have been sat here for the past 3 hours trying to build this project. What am I doing wrong? This happens whenever I try to select any of the onnx models. However, it works fine downloading the release verison.

2024-07-18 19:26:58.1287606 [E:onnxruntime:, inference_session.cc:2045 onnxruntime::InferenceSession::Initialize::::operator ()] Exception during initialization: D:\a_work\1\s\onnxruntime\core\providers\dml\DmlExecutionProvider\src\AbiCustomRegistry.cpp(519)\onnxruntime.DLL!00007FFB2FFE1B66: (caller: 00007FFB30015757) Exception(3) tid(45b0) 80070057 The parameter is incorrect.

2024-07-18 19:26:59.4645567 [E:onnxruntime:, inference_session.cc:2045 onnxruntime::InferenceSession::Initialize::::operator ()] Exception during initialization: D:\a_work\1\s\onnxruntime\core\providers\dml\DmlExecutionProvider\src\AbiCustomRegistry.cpp(519)\onnxruntime.DLL!00007FFB2FFE1B66: (caller: 00007FFB30015757) Exception(6) tid(45b0) 80070057 The parameter is incorrect.

yungDoom commented 1 month ago

It should look like this to make it work: Screenshot 2024-07-19 124333

You need onnxruntime.dll, DirectML.dll and System.Management.dll

onnxruntime.dll = You can find it inside runtimes\win-x64\native\ folder DirectML.dll = You can get it from the Latest Version of Aimmy in Releases System.Management.dll = Can be obtained in runtimes\win\lib\ netversion \

TaylorIsBlue commented 1 month ago

Make sure that when you are debugging, you change from Any CPU to X64, theres a dropdown next to the green play button to debug your build of aimmy that usually says Any CPU.

yungDoom commented 1 month ago

Yeah that will get all the files automatically and make it work without any modifications, you should switch to x64 as taylorisblue said.