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.

DPIR (denoiser)
#1
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 Huh !


Some pointers would be great..  Cool


Ta Ta

Toilet (°^ °)
Reply
#2
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
Reply
#3
@selur,

The thing is, my gpu IS NOT utilized at all whit that filter !? Not even 1 bit..  Huh

Fyi, DPIR works on a old 4060Ti 8GB/GDDR6... But not on a 4070Ti → 12GB/GDDR6X ← Tongue  ?

Driver is up to date 551.61..

No, something else is going on.. 
 

ta TA,
Duck
Reply
#4
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
Reply
#5
(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  Confused

Didn't think torch addon is still a work in progress (updates !)...


cheers,
Reply
#6
Torch dependencies get updated as do the drivers. Tongue
(When updating Hybrid, also check whether a new torch is available,.. )
Reply
#7
...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 ...  Dodgy 



Ta TA
Reply
#8
Those need to be resaved on updates,..
Reply
#9
(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  Dodgy


Cheers,
Reply
#10
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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)