schizo_denoise: Use vszipcl/cu for NLMeans#37
Conversation
| a=nlm_a, | ||
| d=radius[1], | ||
| channels="UV", | ||
| num_streams=2 |
There was a problem hiding this comment.
Should this actually be default lol
I know all the benchmarks used this but is it worth putting more resources into nlm in the context of a real script
There was a problem hiding this comment.
jetpack has nl_means default to num_streams=2 with it. https://github.com/Jaded-Encoding-Thaumaturgy/vs-jetpack/blob/5fdcfcf1533ab1094c95af802eb95b8d6017a180/vsdenoise/nlm.py#L108
A lot of other filters also default to 2. Bilateral is even 4 and it seems to be fine in a full script. I've been running it with 2 since the nlm-hip commit. If you want could also make it kwargs instead and default to 1.
num_streams=kwargs.pop("num_streams", 1)Although I didn't originally because that is going to conflict with bm3d in vszip cl/cu, lol.
Best might be a num_streams=[2,2] type argument when that happens I suppose.
Also sidenote is there any reason why nlmeans is cuda[0] and bm3d is cuda[1] while everything else is the opposite?
|
Benchmarks using latest vszipcl commit # u16
core.nlm_hip.NLMeans(clip, a=2, d=2, h=0.2, channels="UV", num_streams=2) # 284.35 fps
core.vszipcl.NLMeans(clip, a=2, d=2, h=0.2, channels="UV", num_streams=2) # 652.45 fps
core.vszipcu.NLMeans(clip, a=2, d=2, h=0.2, channels="UV", num_streams=2) # 510.95 fps
# fp32
core.nlm_hip.NLMeans(clip, a=2, d=2, h=0.2, channels="UV", num_streams=2) # 263.90 fps
core.vszipcl.NLMeans(clip, a=2, d=2, h=0.2, channels="UV", num_streams=2) # 487.53 fps
core.vszipcu.NLMeans(clip, a=2, d=2, h=0.2, channels="UV", num_streams=2) # 381.22 fpsAnd from Varde: https://gist.github.com/Ichunjo/ee50ee5a526cd5f123cb2e0de41c7571 |
|
Instead of calling the plugins directly wouldn't it be better to call the wrapper? vsjetpack is already a dependency so you can just use the wrapper and it use its fallback. |
|
Half the historical reason for this thing existing is breakage in those |
Also moved the args into a dict so they aren't repeated 3 times.
In my testing for this PR I found vszipcl is actually slightly slower but surely julek speeds that up some more. (Clueless)
Jetpack already removed knlmeans, nlm-cuda, and nlm-hip so it still makes sense to still do this..
Jaded-Encoding-Thaumaturgy/vs-jetpack@5fdcfcf
For Nvidia users vszipcu is a huge upgrade at least.