Posts: 528
Threads: 59
Joined: Oct 2022
Helluuh,
About "Dpir" denoiser..
Is this filter meant to be used ONLY in conjuction whit other filters→ such as Resizers (RealESRGAN) and for SD content only ??
I remember using DPIR for SD res (dvd) content, and it worked splendid..
But now i wanted to try this filter on 1080p FHD content, but it doesn't do anything ..! Not even at max settings !
Some pointers would be great..
Ta Ta
Toilet (°^ °)
Posts: 10.842
Threads: 56
Joined: May 2017
28.02.2024, 16:37
(This post was last modified: 28.02.2024, 16:38 by Selur.)
Works fine here on HD content.
# Imports
import vapoursynth as vs
# getting Vapoursynth core
import ctypes
import site
import sys
import os
core = vs.core
# Import scripts folder
scriptPath = 'F:/Hybrid/64bit/vsscripts'
sys.path.insert(0, os.path.abspath(scriptPath))
# Adding torch dependencies to PATH
path = site.getsitepackages()[0]+'/torch_dependencies/bin/'
ctypes.windll.kernel32.SetDllDirectoryW(path)
path = path.replace('\\', '/')
os.environ["PATH"] = path + os.pathsep + os.environ["PATH"]
# Loading Plugins
core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/vslsmashsource.dll")
# source: 'C:\Users\Selur\Desktop\Source\AKG01.mkv'
# current color space: YUV420P10, bit depth: 10, resolution: 1920x1080, fps: 23.976, scanorder: progressive, yuv luminance scale: limited, matrix: 709, transfer: bt.709, primaries: bt.709
# Loading C:\Users\Selur\Desktop\Source\AKG01.mkv using LWLibavSource
clip = core.lsmas.LWLibavSource(source="C:/Users/Selur/Desktop/Source/AKG01.mkv", format="YUV420P10", stream_index=0, cache=0)
frame = clip.get_frame(0)
# Setting detected color matrix (709).
clip = core.std.SetFrameProps(clip, _Matrix=1)
# Setting color transfer (709), if it is not set.
if '_Transfer' not in frame.props or not frame.props['_Transfer']:
clip = core.std.SetFrameProps(clip, _Transfer=1)
# Setting color primaries info (to 709), if it is not set.
if '_Primaries' not in frame.props or not frame.props['_Primaries']:
clip = 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 23.976
clip = core.std.AssumeFPS(clip=clip, fpsnum=24000, fpsden=1001)
clip = core.std.SetFrameProp(clip=clip, prop="_FieldBased", intval=0) # progressive
from vsdpir import dpir as DPIR
# adjusting color space from YUV420P10 to RGBH for vsDPIRDenoise
clip = core.resize.Bicubic(clip=clip, format=vs.RGBH, matrix_in_s="709", range_s="limited")
# denoising using DPIRDenoise
clip = DPIR(clip=clip, strength=5.000, task="denoise", device_index=0)
# adjusting output color from: RGBH to YUV420P10 for NVEncModel
clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P10, matrix_s="709", range_s="limited", dither_type="error_diffusion")
# set output frame rate to 23.976fps (progressive)
clip = core.std.AssumeFPS(clip=clip, fpsnum=24000, fpsden=1001)
# Output
clip.set_output()
with FP16 VRAM usage is < 5.2GB. (TRT uses < 7.2 GB)
with FP32 VRAM usage is < 7.2 GB (TRT uses < 10 GB)
only using 1 Stream (multiple streams will increase VRAM usage) and no tiling (tiling should lower VRAM usage).
=> my guess is that your are running out of VRAM (Strength does not have change VRAM usage), so my suggestion is: try tiling
Cu Selur
Posts: 528
Threads: 59
Joined: Oct 2022
@selur,
The thing is, my gpu IS NOT utilized at all whit that filter !? Not even 1 bit..
Fyi, DPIR works on a old 4060Ti 8GB/GDDR6... But not on a 4070Ti → 12GB/GDDR6X ← ?
Driver is up to date 551.61..
No, something else is going on..
ta TA,
Duck
Posts: 10.842
Threads: 56
Joined: May 2017
I'm using driver version 551.61.
Might be some issue with the drivers and the addon version you are using.
Which torch download are you using. (I'm using VapoursynthR65_torch_2024.02.19.7 here)
Cu Selur
Posts: 528
Threads: 59
Joined: Oct 2022
(28.02.2024, 17:10)Selur Wrote: I'm using driver version 551.61.
Might be some issue with the drivers and the addon version you are using.
Which torch download are you using. (I'm using VapoursynthR65_torch_2024.02.19.7 here)
Cu Selur
Ah.. that might explain it... → VapoursynthR65_torch_2023.10.29
Didn't think torch addon is still a work in progress (updates !)...
cheers,
Posts: 10.842
Threads: 56
Joined: May 2017
28.02.2024, 17:16
(This post was last modified: 28.02.2024, 17:17 by Selur.)
Torch dependencies get updated as do the drivers.
(When updating Hybrid, also check whether a new torch is available,.. )
Posts: 528
Threads: 59
Joined: Oct 2022
...errr... outdated torch addon doesn't actually explains it ..
Just restarted Hybrid, using defaults and Dpir now works on FHD content !!?
Loading / Using presaved global profiles seems to be a recurring issue ...
Ta TA
Posts: 10.842
Threads: 56
Joined: May 2017
Those need to be resaved on updates,..
Posts: 528
Threads: 59
Joined: Oct 2022
(28.02.2024, 17:18)Selur Wrote: Those need to be resaved on updates,..
So you've told me LONG before.. SO I DID from then on.. Yet .. here we are
Cheers,
Posts: 10.842
Threads: 56
Joined: May 2017
28.02.2024, 17:23
(This post was last modified: 28.02.2024, 17:24 by Selur.)
Share the global profile you use.
Write a detailed step-by-step what you do and if I can reproduce it, I might be able to fix it.
Otherwise it's nothing I can help with.
If it does still work on SD content, but not on HD content a driver<>filter issue is more likely.
Cu Selur
|