HolyWu / vs-dpir

DPIR function for VapourSynth
MIT License
31 stars 3 forks source link

Lazy loading is not enabled. #36

Closed superyu1337 closed 1 year ago

superyu1337 commented 1 year ago

Getting this warning message before the YUV4MPEG2 header. Causes unrecognized headers in ffmpeg and mpv, can't do anything with it it seems. A while later, the vspipe starts outputting stuff.

[06/01/2023-15:40:27] [TRT] [W] CUDA lazy loading is not enabled. Enabling it can significantly reduce device memory usage and speed up TensorRT initialization. See "Lazy Loading" section of CUDA documentation https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#lazy-loading
HolyWu commented 1 year ago

CUDA_MODULE_LOADING is already set to LAZY on https://github.com/HolyWu/vs-dpir/blob/23511d6b5e3f8a38c9be781f8d9c25fc740e760d/vsdpir/__init__.py#L21, hence you shouldn't see that warning message unless you are using something like subprocess.run() with a custom env argument.

superyu1337 commented 1 year ago

Yeah that's why im confused. Im simply running the script using vspipe -c y4m denoise.vpy - | mpv -

My script:

import vapoursynth as vs
import os
core = vs.core

from vsdpir import dpir

clip = core.ffms2.Source(source='./testclip.mkv')

clip = core.resize.Spline16(clip, format=vs.RGBS, matrix_in_s="470bg", dither_type="error_diffusion")

ret = dpir(clip, trt=True, tile_w=854, tile_h=480)

ret = core.resize.Spline16(clip=ret, format=vs.YUV420P16, matrix_s="709", range_s="full")

ret.set_output()
HolyWu commented 1 year ago

What do you get if you run python -c "import vsdpir; print(vsdpir.__version__)" under cmd?

superyu1337 commented 1 year ago

What do you get if you run python -c "import vsdpir; print(vsdpir.__version__)" under cmd?

Sorry for answering this late. I'm getting 3.1.1

HolyWu commented 1 year ago

Then I have no idea what's the culprit, sorry. Maybe try manually adding CUDA_MODULE_LOADING to your system environment variable.

superyu1337 commented 1 year ago

Got it working fine when setting the env var within my shell instead.