401 (edited by Andrey 08-01-2023 07:48:58)

Re: New RIFE filter - 3x faster AI interpolation possible in SVP!!!

Done.

Re: New RIFE filter - 3x faster AI interpolation possible in SVP!!!

read the instructions _carefully_

403 (edited by aloola 07-01-2023 15:57:16)

Re: New RIFE filter - 3x faster AI interpolation possible in SVP!!!

Andrey wrote:

Please help with this .dll - does it need to be placed somewhere manually?

Try this I think
https://cdn.discordapp.com/attachments/290709370600423424/1061311243287265380/image.png

404 (edited by aloola 07-01-2023 16:25:08)

Re: New RIFE filter - 3x faster AI interpolation possible in SVP!!!

I tested the fix
- the slow motion bug was fixed
but the TRT on transcode speed is still slower than TRT off, and real time mpv with TRT on didn't work at all.
also
flownet_v4.6.pkl_NVIDIA GeForce RTX 3070 Ti_trt-8.5.2.2_1280x768_fp32_workspace-1073741824_scale-1.0_ensemble-False.pt
isn't it should be FP16?

edit: realtime with mpv is working for now. Still, the speed is slower than TRT off.

Re: New RIFE filter - 3x faster AI interpolation possible in SVP!!!

> isn't it should be FP16?

replace base.py

> realtime with mpv is working for now

doesn't work for me hmm
"CUDA error: invalid device context"

406 (edited by aloola 08-01-2023 00:18:24)

Re: New RIFE filter - 3x faster AI interpolation possible in SVP!!!

nothing~~~~~

Re: New RIFE filter - 3x faster AI interpolation possible in SVP!!!

That one - https://github.com/AmusementClub/vs-mlrt - is MUUUUCH better
-------------
Post updates:
15/01: instructions removed, just install the "TensorRT" package via SVP's "Additional programs and features"
09/01: updated both libs and scripts, should improve 4K performance on 4080+

408 (edited by pille 07-01-2023 20:13:55)

Re: New RIFE filter - 3x faster AI interpolation possible in SVP!!!

Chainik wrote:

That one - https://github.com/AmusementClub/vs-mlrt - is MUUUUCH better

The other model (4.6) wont shop up in SVP for me, even after restarting svp and computer.

409 (edited by grobalt 07-01-2023 21:35:59)

Re: New RIFE filter - 3x faster AI interpolation possible in SVP!!!

damn .. too difficult to do something useful in this forum as it seems just one posting per hour is doable or something like this ...

1080P with 4x is possible .. currently creating the files for 4k ... 4k lagging.

transcoding results with TensorRT onnx 4.6 gputhreads=2(and 4-> same results)
1080p -> 117.8 fps
2160p -> 22,4 fps

Re: New RIFE filter - 3x faster AI interpolation possible in SVP!!!

[vapoursynth] RuntimeError: "C:/Program Files (x86)/SVP 4/rife\models\rife\rife_v4.6.onnx" not found, built-in models can be found at https://github.com/AmusementClub/vs-mlrt/releases

you need put the *.onnx files here C:\Program Files (x86)\SVP 4\rife\models\rife

if there is a black board appear it means you're using TRT ver.

The other model (4.6) wont shop up in SVP for me, even after restarting svp and computer.

those model won't work with RIFE TRT, just ignore them.

https://media.discordapp.net/attachments/290709370600423424/1061384563072454847/image.png?width=512&height=545

RIFE TRT ~83FPS, easy to watch x3 24 1080p in realtime. Compare with vsrife ~60fps

Re: New RIFE filter - 3x faster AI interpolation possible in SVP!!!

> you need put the *.onnx files here C:\Program Files (x86)\SVP 4\rife\models\rife

yeah, my bad... fixed now

Re: New RIFE filter - 3x faster AI interpolation possible in SVP!!!

Chainik wrote:

That one - https://github.com/AmusementClub/vs-mlrt - is MUUUUCH better
-------------
Let's try this:

0. nothing to do with Python big_smile
1. download --> https://www.svp-team.com/files/temp/rife-trt-0701-1.7z <--, unpack into SVP 4\rife (you should already have this folder), so vstrt.dll must be in the root, i.e. SVP 4\rife\vstrt.dll
2. replace generate.js, base.py in SVP 4\script; restart SVP to be sure
3. menu -> Applications settings -> Additional options -> All settings, go to 'User defined options'
Title: TensortRT; Script name: rife_trt; Other values by default - "FRC profile", "ON or OFF"
Click 'Add option'
Go to the RIFE video profile, see the added TensortRT on/off swtich.
Make a copy of the RIFE video profile, one with TensorRT ON and another with OFF.

Pros:
- no Pytorch!
- works in a real-time
- even faster (?) than vsrife [could be just because of some TensorRT options]
Cons:
- even slower (?) first-time initialization [could be just because of some TensorRT options]
- a nasty command-line window will pop-up for every new video resolution

Tested this out with an RTX 4090 and seem to be getting around 115fps on a 1080p video. So much better than the default implementation. Used to only get around 80fps with the default

Re: New RIFE filter - 3x faster AI interpolation possible in SVP!!!

DragonicPrime wrote:

Tested this out with an RTX 4090 and seem to be getting around 115fps on a 1080p video. So much better than the default implementation. Used to only get around 80fps with the default

that's kinda low, Based on the benchmark, 4090 run 1080p should be at ~200fps

https://github.com/AmusementClub/vs-mlr … e-RTX-4090
https://cdn.discordapp.com/attachments/290709370600423424/1061402473782329414/image.png

Re: New RIFE filter - 3x faster AI interpolation possible in SVP!!!

> Based on the benchmark

benchmark is for 4.4 model, and I set 4.6 as a default one here

plus note the "GPU threads" option in the video profile, it directly translates into "TRT streams" count

Re: New RIFE filter - 3x faster AI interpolation possible in SVP!!!

2 and 4 streams have identical performance on my 4090 where k can confirm 115 fps in 1080p. Will try tomorrow with 4.4

Re: New RIFE filter - 3x faster AI interpolation possible in SVP!!!

Does this help ? https://github.com/AmusementClub/vs-mlr … nt-4623148

I run the 4090 as a pcie 4 card in a pcie 4 x16 slot..

Re: New RIFE filter - 3x faster AI interpolation possible in SVP!!!

grobalt wrote:

Does this help ? https://github.com/AmusementClub/vs-mlr … nt-4623148

I run the 4090 as a pcie 4 card in a pcie 4 x16 slot..

I'm running mine like that as well, so it doesn't look like that's what's limiting the performance

Re: New RIFE filter - 3x faster AI interpolation possible in SVP!!!

i tried to investigate with the nvidia monitoring tool ...
https://github.com/AmusementClub/vs-mlr … nt-4624607

Re: New RIFE filter - 3x faster AI interpolation possible in SVP!!!

> 115 fps in 1080p.

just to be sure - what is the encoding speed with the generic SVP video profile?
I hope you're using H.264/NVENC, not "software" mode as on the screenshot above

Re: New RIFE filter - 3x faster AI interpolation possible in SVP!!!

try this

Post's attachments

generate.js 20.65 kb, 175 downloads since 2023-01-08 

421 (edited by grobalt 08-01-2023 13:09:03)

Re: New RIFE filter - 3x faster AI interpolation possible in SVP!!!

just to understand the workflow .. mpv creates a full script based on input from base.py and generate.js and this script is stored under C:\Users\%user%\AppData\Roaming\SVP4\scripts

correct ?

This file does not contain the parameter use_cuda_graph=True and stream maximum is 4 and github user recommends 5 streams to saturate the Ampere GPU - but RTX is already the successor https://github.com/AmusementClub/vs-mlr … nt-4625003

I deleted all models in the appdata folder to make sure they are created from scratch -> with the new generate.js still 22 fps, nothing changed

Re: New RIFE filter - 3x faster AI interpolation possible in SVP!!!

here's a full script you can use for testing
run with
> vspipe test.py .

variables:
- frame size on line 16, "length" is the number of source frames
- CPU threads on line 6
- GPU streams on line 27
- SVP's add. functions on/off - comment line 69

I thought the problem was in a CPU threads number, which was 4 before, and it's not enough to feed the GPU. Now it's 8, but you're saying there's no difference. Which is strange.
DON'T FORGET TO RESTART SVP after .js/.py file replacing, it may not reload these files automatically in some cases

---
BTW use_cuda_graph=True gives only like 2% difference in my case

Post's attachments

test.py 3.63 kb, 171 downloads since 2023-01-08 

Re: New RIFE filter - 3x faster AI interpolation possible in SVP!!!

Thanks, will invest later tonight how to apply this smile do you read the github thread ?

Re: New RIFE filter - 3x faster AI interpolation possible in SVP!!!

---> DON'T FORGET TO RESTART SVP after .js/.py file replacing, it may not reload these files automatically in some cases <---

Re: New RIFE filter - 3x faster AI interpolation possible in SVP!!!

https://cdn.discordapp.com/attachments/290709370600423424/1061716094928302231/image.png
I just want to report that I got 30fps on 4k transcoding, so it's not SVP problem I think?
rife_v4.6.onnx.3840x2176_fp16_workspace128_trt-8502_NVIDIA-GeForce-RTX-3070-Ti_3dcbe72f.engine
with GPU threads 3


damn .. too difficult to do something useful in this forum as it seems just one posting per hour is doable or something like this ...

1080P with 4x is possible .. currently creating the files for 4k ... 4k lagging.

transcoding results with TensorRT onnx 4.6 gputhreads=2(and 4-> same results)
1080p -> 117.8 fps
2160p -> 22,4 fps

maybe something is wrong with your setup?
my PC is 5900x + 32GB 3600RAM4 C16 + 3070ti, based on average benchmark 4090 is x2 stronger than 3070ti so it should get better result than mine.