Selur's Little Message Board
Hybrid 2022.03.20.1: No module named 'vsdpir' - Printable Version

+- Selur's Little Message Board (https://forum.selur.net)
+-- Forum: Hybrid - Support (https://forum.selur.net/forum-1.html)
+--- Forum: Problems & Questions (https://forum.selur.net/forum-3.html)
+--- Thread: Hybrid 2022.03.20.1: No module named 'vsdpir' (/thread-2330.html)

Pages: 1 2 3 4 5 6 7 8


RE: Hybrid 2022.03.20.1: No module named 'vsdpir' - Selur - 30.03.2022

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. Smile

Cu Selur


RE: Hybrid 2022.03.20.1: No module named 'vsdpir' - Dan64 - 30.03.2022

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.


RE: Hybrid 2022.03.20.1: No module named 'vsdpir' - Selur - 30.03.2022

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. Smile

Cu Selur


RE: Hybrid 2022.03.20.1: No module named 'vsdpir' - Dan64 - 30.03.2022

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"


RE: Hybrid 2022.03.20.1: No module named 'vsdpir' - Selur - 30.03.2022

Argh,... (I assume you did import os and site, and you did delete the __pycache__-folder in the onnxruntime/capi-folder)


RE: Hybrid 2022.03.20.1: No module named 'vsdpir' - Selur - 30.03.2022

Nope, doesn't seem to work here too. Sad
(works when I open vsViewer separately)


RE: Hybrid 2022.03.20.1: No module named 'vsdpir' - Selur - 30.03.2022

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.


RE: Hybrid 2022.03.20.1: No module named 'vsdpir' - Selur - 31.03.2022

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


RE: Hybrid 2022.03.20.1: No module named 'vsdpir' - Dan64 - 31.03.2022

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


RE: Hybrid 2022.03.20.1: No module named 'vsdpir' - Selur - 31.03.2022

Nice will create new a dev version and new addon after work and send you a link for testing.

Cu Selur