This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Hybrid 2022.03.20.1: No module named 'vsdpir'
#11
I got the same output.

I upgraded vspdir to 2.1.0

This time I got the following error when the preview window is shown:

File "src\cython\vapoursynth.pyx", line 2832, in vapoursynth._vpy_evaluate
File "src\cython\vapoursynth.pyx", line 2833, in vapoursynth._vpy_evaluate
File "F:\VideoTests\Test_vsDpir\tempPreviewVapoursynthFile16_44_23_115.vpy", line 23, in
clip = DPIR(clip=clip, strength=5.000, task="denoise", provider=1, device_id=0)
File "D:\Programs\Hybrid\64bit\Vapoursynth\Lib\site-packages\vsdpir\__init__.py", line 92, in DPIR
raise vs.Error("DPIR: model files have not been downloaded. run 'python -m vsdpir' first")
vapoursynth.Error: DPIR: model files have not been downloaded. run 'python -m vsdpir' first
Reply
#12
Okay, seems like the models are missing, call:
python -m vsdpir

Cu Selur
Reply
#13
(27.03.2022, 16:46)Dan64 Wrote: I got the same output.

I upgraded vspdir to 2.1.0

This time I got the following error when the preview window is shown:

File "src\cython\vapoursynth.pyx", line 2832, in vapoursynth._vpy_evaluate
File "src\cython\vapoursynth.pyx", line 2833, in vapoursynth._vpy_evaluate
File "F:\VideoTests\Test_vsDpir\tempPreviewVapoursynthFile16_44_23_115.vpy", line 23, in
clip = DPIR(clip=clip, strength=5.000, task="denoise", provider=1, device_id=0)
File "D:\Programs\Hybrid\64bit\Vapoursynth\Lib\site-packages\vsdpir\__init__.py", line 92, in DPIR
raise vs.Error("DPIR: model files have not been downloaded. run 'python -m vsdpir' first")
vapoursynth.Error: DPIR: model files have not been downloaded. run 'python -m vsdpir' first

I installed the missing modules with the command "python - m vsdpir first"

But now the preview window is not shown I guess that vsdpir crashed. Maybe there is a problem of compatibility with my card (RTX 3060) but even CPU mode is not working.

I decided to downgrade vsdpir to version 1.6.0 and it is working. I tested all versions (I had to run manually vsViewer.exe) and the last working version is 1.7.1. After that version vsdpir start to crash, I don't know if the problem could be due to the management of TensorRT model (even if this model was already available in version 1.7.1), but you should downgrade vsdipir to version 1.7.1 to improve Hybrid compatibility.
Reply
#14
With 2.0 vs-dpir switched to another runtime, which works fine here and you are the first to report problems with it so far, so I will hold off on downgrading to 1.7.1.

The 'Vapoursynth\Lib\site-packages\onnxruntime\capi' folder contains, some dlls from the tensor sdk. My guess is that yes are in the wrong version. (Can't test here since I only own a 1070ti card)

Cu Selur
Reply
#15
(27.03.2022, 17:27)Selur Wrote: With 2.0 vs-dpir switched to another runtime, which works fine here and you are the first to report problems with it so far, so I will hold off on downgrading to 1.7.1.

Cu Selur

I know, I also tried to unistall and reinstall onnxruntime-gpu, but vs-dpir still crash without issue any error message.
Reply
#16
When uninstalling onnxruntime-gpu, did you also remove the 'Vapoursynth\Lib\site-packages\onnxruntime'-folder ?
If not, then you didn't uninstall it completely and the same dlls will be used when reinstalling onnxruntime-gpu .
If you remove that folder you could manually install the CUDA SDK 11.4 (https://developer.nvidia.com/cuda-11-4-4...ad-archive only the runtimes need to be installed) and the 'TensorRT 8.0 GA Update 1' (https://developer.nvidia.com/nvidia-tens...x-download only the runtimes are required)
see: https://onnxruntime.ai/docs/execution-pr...quirements

-> if you figure out which dlls are required for TenrsorRT let me know and I can add them to the normal download.

Cu Selur

Ps.: the required dlls can be placed into the 'Vapoursynth\Lib\site-packages\onnxruntime\capi'-folder and the installed runtimes can be deinstalled.
Reply
#17
the dlls I need for GTX cards are:
  • cublas64_11.dll
  • cublasLt64_11.dll
  • cudart64_110.dll
  • cudnn64_8.dll
  • cudnn_cnn_infer64_8.dll
  • cudnn_ops_infer64_8.dll
  • cufft64_10.dll
  • cufftw64_10.dll
see: https://onnxruntime.ai/docs/execution-pr...vider.html
and I thought that
  • nvinfer.dll
  • nvinfer_plugin.dll
  • nvonnxparser.dll
  • nvparsers.dll
should provide TensorRT support. (Just checked, thise re the only dlls which come with TensorRT-8.0.3.4)

Cu Selur
Reply
#18
I will try also this solution.

In meanwhile I tried the following steps:

1) Install Hybrid version 2021.12.10.1 with the previous torch archive.
2) Upgraded some of modules to get vs-dpir 2.1.0, my full list of modules if the following

Package            Version
------------------ -----------
addict             2.4.0
bpyutils           0.2.0
certifi            2021.10.8
charset-normalizer 2.0.6
colorama           0.4.4
flatbuffers        2.0
idna               3.2
mmcv-full          1.3.14
numpy              1.22.3
onnxruntime-gpu    1.11.0
opencv-python      4.5.3.56
packaging          21.0
Pillow             8.3.2
pip                22.0.4
protobuf           3.19.4
pyparsing          2.4.7
PyYAML             5.4.1
regex              2021.10.8
requests           2.26.0
setuptools         58.2.0
timm               0.5.4
torch              1.9.1+cu111
torchvision        0.10.1
tqdm               4.62.3
typing-extensions  3.10.0.2
urllib3            1.26.7
VapourSynth        57
vsbasicvsr         1.2.0
vsbasicvsrpp       1.3.0
vsdpir             2.1.0
vsffdnet           1.1.1
vsgan              1.6.4
vshinet            1.0.0
vsrealesrgan       1.2.0
vsrife             1.3.0
vsswinir           1.0.0
vsutil             0.6.0
wheel              0.37.0
yapf               0.31.0

3) Then I installed over the Hybrid version 2022.03.20.1

Now the preview window is working, but it is very slow, it took about 25sec to show the frames. I think that the reason is because I'm using torch 1.9.1+cu111.

But the encoding still crash, I guess that the first frame is provided too late (probably after 25sec). I attached the full debug file.


Attached Files
.zip   HybridDebugOutput.zip (Size: 10,54 KB / Downloads: 10)
Reply
#19
Speed is slow because CPU rendering is used.
Encoding crashes due to:
x264 output: y4m [error]: bad sequence header magic
x264 [error]: could not open input file `-'
which means, there's a problem with the Vapourynth script, since the script itself:
# Imports
import vapoursynth as vs
# getting Vapoursynth core
core = vs.core
# Loading Plugins
core.std.LoadPlugin(path="D:/Programs/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/vslsmashsource.dll")
# source: 'F:\VideoTests\Test_vsDpir\Test_video_1m.mkv'
# current color space: YUV420P10, bit depth: 10, resolution: 1280x712, fps: 25, color matrix: 709, yuv luminance scale: limited, scanorder: progressive
# Loading F:\VideoTests\Test_vsDpir\Test_video_1m.mkv using LWLibavSource
clip = core.lsmas.LWLibavSource(source="F:/VideoTests/Test_vsDpir/Test_video_1m.mkv", format="YUV420P10", cache=0, fpsnum=25)
# Setting color matrix to 709.
clip = core.std.SetFrameProps(clip, _Matrix=1)
clip = clip if not core.text.FrameProps(clip,'_Transfer') else core.std.SetFrameProps(clip, _Transfer=1)
clip = clip if not core.text.FrameProps(clip,'_Primaries') else core.std.SetFrameProps(clip, _Primaries=1)
# Setting color range to TV (limited) range.
clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1)
# making sure frame rate is set to 25
clip = core.std.AssumeFPS(clip=clip, fpsnum=25, fpsden=1)
from vsdpir import DPIR
# adjusting color space from YUV420P10 to RGBS for vsDPIRDenoise
clip = core.resize.Bicubic(clip=clip, format=vs.RGBS, matrix_in_s="709", range_s="limited")
# denoising using DPIRDenoise
clip = DPIR(clip=clip, strength=5.000, task="denoise", provider=0)
# adjusting output color from: RGBS to YUV420P10 for x264Model
clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P10, matrix_s="709", range_s="limited")
# set output frame rate to 25.000fps
clip = core.std.AssumeFPS(clip=clip, fpsnum=25, fpsden=1)
# Output
clip.set_output()
looks fine to me, the Vapoursynth Preview works (I assume that from your post) and the encoding call:
"D:\Programs\Hybrid\64bit\Vapoursynth\vspipe.exe" "F:\VideoTests\Test_vsDpir\encodingTempSynthSkript_2022-03-27@18_35_18_1610.vpy" - -c y4m | "D:\Programs\Hybrid\64bit\x264.exe" --preset fast --crf 18.00 --profile high10 --level 5.1 --sync-lookahead 30 --psy-rd 1.00:0.15 --vbv-maxrate 240000 --vbv-bufsize 720000 --sar 1:1 --deblock -1:-1 --non-deterministic --range tv --colormatrix bt709 --demuxer y4m --input-range tv --fps 25/1 --opencl --opencl-clbin "F:\VideoTests\Test_vsDpir\x264_lookahead_2022-03-27@18_35_18_1610_02.clbin" --output-depth 10 --output "F:\VideoTests\Test_vsDpir\2022-03-27@18_35_18_1610_02.264" -
my guess is that using the (totally useless) opencl support in x264 interferes with vsdpir and makes it crash somehow.
-> have you tried without the opencl option in x264?

Cu Selur
Reply
#20
I'm worried that is using the CPU, since I selected "NVIDIA CUDA". The encoding crash even disabling opencl. I tried also x265, same problem.

I will try your solution to add the NVIDIA dlls.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)