Posts: 11.515
Threads: 63
Joined: May 2017
30.03.2022, 20:06
(This post was last modified: 30.03.2022, 20:17 by Selur.)
Does it work for you is you copy the files into the Vapoursynth\Lib\site-packages\onnxruntime\capi folder and add that folder to the PATH variable?
I just checked and it sees like installing onnxruntime did add the path on my system.
Hmm,.. that's probably not it either, I remoed the path from PATH rebootet the system and it's still working here. :/
my PATH contains:
C:\Python37\Scripts\;C:\Python37\;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Kensington\TrackballWorks;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\Calibre2\;C:\Program Files (x86)\GnuPG\bin;C:\Program Files\PuTTY\;C:\Program Files\Git\cmd;"C:\Users\Selur\AppData\Local\Microsoft\WindowsApps;";
nothing that should be related to Vapoursynth&co.
Or may be it does, I noticed a __pycache__ folder inside the capi folder, deleting that and it doesn't work here either.
-> okay, this might be a hint.
Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
>>> Offline from 30th of June till 6th of July. <<<
(will be at the
RochHarz festival)
Posts: 899
Threads: 76
Joined: Feb 2020
If I put the folder "Vapoursynth\Lib\site-packages\onnxruntime\capi" in the PATH and copy inside it the CUDA dlls, vs-dpir works as expected.
Posts: 11.515
Threads: 63
Joined: May 2017
okay seems like if I put the dlls inside the Lib/site-packages/onnxruntime/capi-folder and expand the script by:
import os
import site
# Import scripts folder
os.environ["PATH"] += site.getsitepackages()[0]+'/Lib/site-packages/onnxruntime/capi'
it seems to work here.
Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
>>> Offline from 30th of June till 6th of July. <<<
(will be at the
RochHarz festival)
Posts: 899
Threads: 76
Joined: Feb 2020
On my side this approach does not works.
Even if I change the path as:
os.environ["PATH"] += "D:\Programs\Hybrid\64bit\cuda_11_4"
Posts: 11.515
Threads: 63
Joined: May 2017
30.03.2022, 20:51
(This post was last modified: 30.03.2022, 20:52 by Selur.)
Argh,... (I assume you did import os and site, and you did delete the __pycache__-folder in the onnxruntime/capi-folder)
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
>>> Offline from 30th of June till 6th of July. <<<
(will be at the
RochHarz festival)
Posts: 11.515
Threads: 63
Joined: May 2017
30.03.2022, 21:00
(This post was last modified: 30.03.2022, 21:01 by Selur.)
Nope, doesn't seem to work here too.

(works when I open vsViewer separately)
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
>>> Offline from 30th of June till 6th of July. <<<
(will be at the
RochHarz festival)
Posts: 11.515
Threads: 63
Joined: May 2017
may be one can get it working when overwriting 'CUDA_PATH' instead of 'PATH' and adding the right dlls,...
going to bed now, hopefully I find a way to get this working or I will probably drop the addon (and the support for it in Hybrid) all together since it seems too much trouble to get this working.
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
>>> Offline from 30th of June till 6th of July. <<<
(will be at the
RochHarz festival)
Posts: 11.515
Threads: 63
Joined: May 2017
31.03.2022, 05:19
(This post was last modified: 31.03.2022, 05:19 by Selur.)
I moved the dlls to a separate folder 'Hybrid/64bit/Vapoursynth/onnxruntime_dlls/' to keep them separate from potentiall updates, cleared the __pycache__-folders and called:
import os
import site
# Import libraries for onnxruntime
from ctypes import WinDLL
path = site.getsitepackages()[0]+'/onnxruntime_dlls/'
WinDLL(path+'cublas64_11.dll')
WinDLL(path+'cudart64_110.dll')
WinDLL(path+'cudnn64_8.dll')
WinDLL(path+'cudnn_cnn_infer64_8.dll')
WinDLL(path+'cudnn_ops_infer64_8.dll')
WinDLL(path+'cufft64_10.dll')
WinDLL(path+'cufftw64_10.dll')
which does the trick for me. For Tensor support you will have to load the other libraries too (order might matter).
-> let me know whether this works for you too. (and in which order you loaded the libraries if it works, so I can write code that Hybrid will import these automatically)
Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
>>> Offline from 30th of June till 6th of July. <<<
(will be at the
RochHarz festival)
Posts: 899
Threads: 76
Joined: Feb 2020
This the full list of dlls (using the correct order) which is working for me
WinDLL(path+'cublas64_11.dll')
WinDLL(path+'cudart64_110.dll')
WinDLL(path+'cudnn64_8.dll')
WinDLL(path+'cudnn_cnn_infer64_8.dll')
WinDLL(path+'cudnn_ops_infer64_8.dll')
WinDLL(path+'cufft64_10.dll')
WinDLL(path+'cufftw64_10.dll')
WinDLL(path+'nvinfer.dll')
WinDLL(path+'nvinfer_plugin.dll')
WinDLL(path+'nvparsers.dll')
WinDLL(path+'nvonnxparser.dll')
P.S.
I also checked the dependencies with:
https://github.com/lucasg/Dependencies
Posts: 11.515
Threads: 63
Joined: May 2017
Nice will create new a dev version and new addon after work and send you a link for testing.
Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
>>> Offline from 30th of June till 6th of July. <<<
(will be at the
RochHarz festival)