Skip to content

schizo_denoise: Use vszipcl/cu for NLMeans#37

Open
TheFeelTrain wants to merge 1 commit into
Vodes:masterfrom
TheFeelTrain:master
Open

schizo_denoise: Use vszipcl/cu for NLMeans#37
TheFeelTrain wants to merge 1 commit into
Vodes:masterfrom
TheFeelTrain:master

Conversation

@TheFeelTrain

@TheFeelTrain TheFeelTrain commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

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.

core.knlm.KNLMeansCL(clip, a=2, d=2, h=0.2, channels="UV")                # 129.68 fps
core.nlm_hip.NLMeans(clip, a=2, d=2, h=0.2, channels="UV", num_streams=2) # 268.85 fps
core.vszipcl.NLMeans(clip, a=2, d=2, h=0.2, channels="UV", num_streams=2) # 263.59 fps
core.vszipcu.NLMeans(clip, a=2, d=2, h=0.2, channels="UV", num_streams=2) # 384.75 fps

Comment thread vodesfunc/denoise.py
a=nlm_a,
d=radius[1],
channels="UV",
num_streams=2

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@TheFeelTrain TheFeelTrain Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants