lwk7454 wrote:

I know it's a bit odd but it seems this parameter doesn't matter...

Thanks for answering my questions and for the new tests.

Now everything is starting to come together logically and I'm slowly starting to understand almost everything.

I'll describe it, because someone might find it useful, although it's probably obvious to many.

I checked and the phrase "thread":
occurs only in the RIFE filter for VapourSynth (ncnn) code
https://github.com/HomeOfVapourSynthEvo … h?q=thread

does not appear in the RIFE filter for VapourSynth (PyTorch) code at all
https://github.com/HolyWu/vs-rife/search?q=thread

In other words, your change of code:

smooth = RIFE(input_m,model_ver=3.8,fp16=not rife_precision,scale=1.0,device_index=rife_gpu)

and the tests confirmed 2 things:
1. indeed the code change fixed scale=1 permanently
2. the "GPU threads" does not change anything for the RIFE filter for VapourSynth (PyTorch)

For people who will want to follow your path a small summary:

1. manual change of the code to the one shown above.
2. RIFE options:
Test-Time Augmentation: Enabled [sets RIFE filter for VapourSynth (PyTorch)]
Math precision: Half (FP16)

About virtual nodes:

GPU workloads are executed on GPU hardware engines. On Windows, these engines are represented by "nodes". With Hardware Scheduling disabled for Windows 10 May 2020 Update, some NVIDIA GPU engines are represented by virtual nodes, and multiple virtual nodes may represent more than one GPU hardware engine. This is done to achieve better parallel execution of workloads. Examples of these virtual nodes are "Cuda", "Compute_0", "Compute_1", and "Graphics_1" as shown in Windows Task Manager. These correspond to the same underlying hardware engines as the "3D" node in Windows Task Manager. With Hardware Scheduling enabled, the virtual nodes are no longer needed, and Task Manager shows only the "3D "node for the previous "3D" node and multiple virtual nodes shown before, combined. CUDA is still supported in this scenario.

NVIDIA CUDA TOOLKIT 11.0.3 https://docplayer.net/192620757-Nvidia- … olkit.html


In Windows Task Manager there should be 4 graphs and the content of each graph should be changeable from the drop down list:

https://static.nicehash.com/marketing%2FCompute_task_manager.png

In the quote below, Chainik has shown the load on his NVIDIA GeForce RTX 2060 Mobile graphics card with real-time interpolation using RIFE filter for VapourSynth (ncnn).

The first result shows how the graphics card handles the video file without issue (SVP index: 1.0) with a real-time load of 65% indicated by Compute_1.

The second result shows how the graphics card can't keep up with real-time interpolation (SVP index: 0.76) as indicated by Compute_1's full 100% saturation, despite the total load surprisingly dropping to single digits.

Chainik wrote:

GPU; VRAM; CPU utilization; SVP index

424*240 - 23% (65% compute_1); 0.9 GB; zero; 1.0
640*360 - 9% (100% compute_1); 0.9 GB; zero; 0.76


Notice how this is consistent with what you wrote earlier:

lwk7454 wrote:

In 1080p GPU utilization was very unstable, when output is smooth it stays at around 60%, but drops to single digits quickly, and frames were droppepd. The result is a very jaggy GPU graph and laggy playback. I feel there are lots of space for optimization, or is my system not configured correctly?

Of course with you NVIDIA GeForce RTX 3090 testing the RIFE filter for VapourSynth (PyTorch) it doesn't have to be Compute_1 at all, it could be a completely different node, or a combination of several. Likewise, changing FP32 to FP16 can also result in load on other nodes. No one has tested or described this. You may be the first and it may interest many people. Me for sure smile Especially since at the moment there is no more powerful graphics card than RTX 3090 for a mere mortal.

lwk7454 wrote:

Sure, I'm happy to test this out and follow this thread.

Thank you very much for the testing I requested and thank you very much for your willingness to continue to help on this thread.

I have read your post and the test results very carefully. I will come back to certain aspects of these results, but for now I am bothered by a few points:


1.

lwk7454 wrote:

I edited base.py that fixed scale to 1.0 regardless of GPU threads.

Did you make this change only before the tests I asked you to do, or before when you wrote in the previous post:

lwk7454 wrote:

Best result's configs I used:
Math precision: FP16
GPU threads: 6

Main take away here is that my GPU was poorly utilized.
In 720p, GPU utilization was about 28%. Using scale=1.0 (i.e. GPU thread=2) it goes up to 48%.

If I understand, by setting "GPU threads: 6" early on you were actually setting scale=0.5, according to this post: https://www.svp-team.com/forum/viewtopi … 183#p79183
which obviously doesn't do the quality any good: https://www.svp-team.com/forum/viewtopi … 250#p79250

2.

Can you share a fragment of the above code that you modified in base.py ?

3.

Request for a short test: to see if changing the GPU threads parameter changes anything in performance after the change in base.py you made.

lwk7454 wrote:

I edited base.py that fixed scale to 1.0 regardless of GPU threads.

Test A:

Test-Time Augmentation: Enabled [sets RIFE filter for VapourSynth (PyTorch)]
AI model: Generic [with above PyTorch version it doesn't matter, because it is set in the 2nd version of base.py by Chainik permanently to model 3.8]
Math precision: Half (FP16)
GPU threads: 2
Test file:
original demo video from the creator of RIFE at: https://github.com/hzwer/arXiv2020-RIFE
720p (1280x720), 25FPS, 53 s 680 ms, 4:2:0 YUV, 8 bits
direct link: https://drive.google.com/file/d/1i3xlKb … sp=sharing

Test B:

Same, except for one parameter:
GPU threads: 6

Please present the performance results as Chainik did in this post: https://www.svp-team.com/forum/viewtopi … 465#p78465

I think such a scheme with 3 parameters will be the best to present these and future results:

Test A
GPU: XX% (XX% Compute_1)
VRAM: X.X GB
SVP index: X.X

Of course, this could be "Compute_1" "Compute_0", "Cuda" or another virtual node, loaded by RIFE.This most accurately shows the actual utilization of GPU computing power by RIFE.

Chainik wrote:

there're no "files for SVP" regarding this

> run 'python -m vsrife' first


The idea is that a random tester who comes in here https://www.svp-team.com/wiki/RIFE_AI_interpolation
doesn't have the problem egandt mentioned.

Someone who reads this thread will probably use the simple solution that lwk7454 presented, but probably not everyone will read all the pages of this thread.

seal wrote:

Well if anyone gets the rife options to show up on a linux build I've got a 5950x and a 3090 ready to test on mpv.

I don't use Linux myself, nor am I familiar with it, but I agree with your request. The more testers the better.

Chainik wrote:

I thought "pip install vsrife" is enough. And it used to be enough in August. Maybe they changed something in packaging...

Yes, HolyWu has made changes with version 1.3.0.
The problem and solution is described here: https://github.com/HolyWu/vs-rife/issues/6
And here the recently added 3 lines of code in the file __init__.py : https://github.com/HolyWu/vs-rife/commi … 86856aabc0

Can you please update the files for SVP so that the models download automatically?

lwk7454 wrote:

Hi guys, glad I found there are people working on real-time playback with RIFE. I've tried this method myself, hope I'm adding more valuable data to your development.

I am also glad that another person took an interest in this topic and added something from himself, which I think will help many other people including me.

I have a request to you: could you please stay with us for a while on this thread and help us test real-time playback with RIFE?

I have read your post thoroughly and will be returning to individual parts in the near future. However, I don't want to write about everything at once as it will be a bit overwhelming, so I will do it gradually.

Firstly, a big thank you for finding a solution to the script problem. I hope this helps egandt and encourages others to test.

Right now I think the most important thing is to get as many people interested in the topic as possible to replicate your path to success with RIFE

My first question:

lwk7454 wrote:

After some troubleshooting I got my VLC player to work with VS RIFE.

Could you please elaborate on what these problems were and how you dealt with them? That might help a lot of people.

Now I will have a request for you to do some simple tests to help us determine the causes of the image freezing that have been described on this thread.

Test parameters:

SVP+VLC media player+RIFE filter for VapourSynth (PyTorch)
real time playback with x2 interpolation:
RIFE model: 3.8
scale=1.0
FP32 or FP16 (your preferred choice)
GPU threads: (your preferred choice)
Test file:
original demo video from the creator of RIFE at: https://github.com/hzwer/arXiv2020-RIFE
720p (1280x720), 25FPS, 53 s 680 ms, 4:2:0 YUV, 8 bits
direct link: https://drive.google.com/file/d/1i3xlKb … sp=sharing
Monitor set to 50Hz or 100Hz or 150Hz or 200Hz

Test file only if image freezes more than 30s on 720p file:
240p (320x240), 15FPS, 6 min 8 sec, 4:2:0 YUV, 8 bits
https://sample-videos.com/video123/mp4/ … p_30mb.mp4

Test variables based on dlr5668 postings
https://www.svp-team.com/forum/viewtopi … 315#p79315
https://www.svp-team.com/forum/viewtopi … 321#p79321

1. disable black bar detection
2. enable black bar detection
3. switch profile in windowed mode
4. switch profile in full screen mode
5. gpu-api=vulkan
6. gpu-api=d3d11

Testing: does the image freeze and for how long (30s = permanent) during:

A. real-time playback with RIFE - first-time initialization
B. real-time playback with RIFE - after pause
C. real-time playback with RIFE - after rewind
B. real-time playback with RIFE - after fast forward

I would be very grateful if you could find some time to run these tests.

egandt wrote:

Well I have not gotten very far as you can see I get some script failure using PyTorch based RIFE

Chainik, can we please ask you to take a look at the script error https://www.svp-team.com/forum/viewtopi … 458#p79458 with your expert eye?

egandt wrote:

As for specs: I'm trying on a AMD 3900x, 64GB of Memory and a 3080 TI card

Great! With this graphics card theoretically it should be possible to interpolate 720p video in real time using SVP with RIFE filter for VapourSynth (PyTorch version) without any problem!


egandt wrote:

I did try that video quickly using Vulkan; I had no issue with that GPU load is around 20%

If we can find a solution for script failure using PyTorch based RIFE, this smaller 240p 15FPS file can be used to test x4 real-time interpolation with RIFE!


egandt wrote:

Fully agree real-time SVP with RIFE would be a game changer, which is why I'm giving it a shot.

That being said, I hope you don't give up and keep actively contributing to this thread until a solution can be found. Since dlr5668 was successful: https://www.svp-team.com/forum/viewtopi … 315#p79315 there must be some way to make it work on the 3080 TI too!

ERIC, thanks for the tests.

Could you elaborate on what GPU you have and try again to run the tests on a very light video file:

240p (320x240), 15FPS, 6 min 8 sec, 4:2:0 YUV, 8 bits, 298 kb/s (video)   
https://sample-videos.com/video123/mp4/ … p_30mb.mp4

I would also encourage others who might be able to conduct tests to start with the above test file. This file will allow you to test real-time interpolation using the RIFE algorithm based on machine learning (artificial intelligence) on both the PyTorch version and the ncnn version on most graphics cards.

I'm still looking for someone with an NVIDIA GPU and some time to test real-time interpolation using SVP with RIFE filter for VapourSynth (PyTorch version):

Chainik wrote:

in the RIFE video profile set
- TTA = disabled -> use RFIE/ncnn/Vulkan
- TTA = enabled -> use RIFE/torch/CUDA.

https://www.svp-team.com/forum/viewtopi … 023#p79023

I'm still looking, as so far only dlr5668 has confirmed that he has successfully done this, but unfortunately it freezes during rewind:
https://www.svp-team.com/forum/viewtopi … 319#p79319

However, I have not been able to find out if this is a permanent or temporary situation. Also, I was unable to find out if it freezes on pause and when resuming playback. The latter is particularly important to me, because if I want to watch something with the best real-time interpolation on PC that RIFE provides, without the possibility of pausing and resuming playback this solution would be doomed to failure for me.

If anyone is wondering why I don't check it myself, the matter is trivially simple: I don't have a modern NVIDIA GPU, because I didn't need it for anything. It is the RIFE interpolation algorithm based on machine learning (artificial intelligence) that could make me purchase such a card and a large expenditure would be justified.

This is why I keep bumping this thread - to find out if smooth real-time interpolation along with pause and resuming playback is possible using SVP with RIFE filter for VapourSynth (PyTorch version).

Thanks a lot for answering all my points and clarifying the test parameters.

I am most interested in real-time interpolation with the RIFE PyTorch/CUDA filter especially because of the 3x better performance than with the default RIFE ncnn/Vulkan filter.

Have you tried the Chainik recommendations from these two posts:

https://www.svp-team.com/forum/viewtopi … 023#p79023
https://www.svp-team.com/forum/viewtopi … 183#p79183

and especially the settings and recommendations of dlr5668, who is the only one so far who has managed to run real-time interpolation with the RIFE PyTorch/CUDA filter:

https://www.svp-team.com/forum/viewtopi … 315#p79315
https://www.svp-team.com/forum/viewtopi … 321#p79321

?

Thank you very much XKCorp for testing and sharing your results smile

Could you please further clarify the parameters with which you performed the test with 512x384 resolution?
I am interested in the following data:

1. Which filter did you use?

Chainik wrote:

in the RIFE video profile set
- TTA = disabled -> use RFIE/ncnn/Vulkan
- TTA = enabled -> use RIFE/torch/CUDA.

https://www.svp-team.com/forum/viewtopi … 023#p79023

2. Which scale? 1.0 or 0.5?

3. Which RIFE model? 3.8 or other?

4. Did you try FP32 with 512x384 resolution? Or only FP16 was able to interpolate in real time with SVP index 1.0?

5. Did it freeze on pause and when resuming playback? If yes: temporary (how long) or permanent (over 1 minute)?

6. Did it freeze on rewind? If yes: temporary (how long) or permanent (over 1 minute)?

7. Did you freeze on fast forward? If yes: temporary (how long) or permanent (over 1 minute)?

dlr5668 wrote:

Well unless I decide to rewind big_smile its 100% freeze as well

Does it also freeze on pause and when resuming playback?

For me this is a very important question. I can live without rewind, but if pause would cause permanent freezing, that would be a serious problem.

dlr5668 wrote:
Chainik wrote:

> Well unless I decide to rewind  big_smile its 100% freeze as well

this is what I'm saying
every re-initialization will hangs
and for me the first-time initialization hangs too in 99% of times

did u try vulkan render ?


Did it help?

I also continue to encourage other SVP users with vs-rife to test real-time playback interpolation.

Please, share your results and experiences.

dlr5668 wrote:

I watched 2h realtime and so far it never hungs.


You read my mind and answered a question that has not yet been asked smile



dlr5668 wrote:

Well unless I decide to rewind big_smile its 100% freeze as well


Does it also freeze on pause and when resuming playback?
What about fast forward?

Have you checked the VRAM and GPU consumption when freezing, not general but in detail:
compute_0
compute_1
CUDA
?

Is the freezing temporary or permanent (over 1 minute)?

Does it freeze the same way on light files like 180p (scale=1.0)?

Finally, it can be stated that vs-rife allows real-time interpolation of HD files without the need for image scaling!

NVIDIA GeForce RTX 3070 Ti
SVP with mpv with vs-rife https://github.com/HolyWu/vs-rife
real time playback with x2 interpolation:
720p - yes, with few drops (about 10 per 2 minutes)
RIFE model: 3.8
scale=1.0
FP32

Thank you so much. You are a genius!
I see you sat on the problem a little longer and found a solution!

Thanks also for uploading the detailed configuration files. This will be very useful for me and others who would like to use RIFE for real-time interpolation.

Thanks to Chainik for implementing RIFE AI interpolation in SVP!
Thanks to dlr5668 for testing and finding a working configuration for real-time HD file interpolation!

del

del

Then we know that:

1. vs-rife can interpolate in real time, but at scale=0.5
2. vs-rife has a problem with realtime interpolation at scale=1, even when fps with reencoding and VRAM is sufficient.

https://www.playbook.com/vadash/NPbJXaD … ABj6bV6hwQ

requires a google account, which I do not have

Thank you very much for checking.

Some time ago you wrote:

dlr5668 wrote:

At least my mpv is not crashing big_smile rewind takes 3-4 sec though

Does this mean that with scale=0.5 you were able to successfully interpolate in real time playback?

dlr5668 wrote:

realtime broke for me after some experiments and now hungs up big_smile

3.5 and 3.8 models takes ~5 GB VRAM under pytorch


Thanks.

Could you try some smaller: 240p 360p or 480p file?

Chainik wrote:

buy 3090!

Thanks Chainik! If you know someone who owns this unicorn and could share his or her results, that would obviously be very helpful.

At the moment we still don't have any confirmation on what card allows smooth real-time interpolation at what resolution at scale=1.

It would be great to have such a list on this thread, so that not only me, but also others can decide if it is worth it and what graphics card to buy for real-time RIFE interpolation.

The main SVP algorithm relies mainly on CPU power, so if someone doesn't play computer games and the main load on the computer is SVP then he or she probably isn't using a high-end graphics card. If he/she wants to buy a GPU to have interpolation with less artifacts, then such a list would be very helpful.

Something along the lines of what you provided for the filter for Vulcan:


Chainik - NVIDIA GeForce RTX 2060 Mobile
https://www.techpowerup.com/gpu-specs/g … bile.c3348
SVP+RIFE filter for VapourSynth (ncnn)

Chainik wrote:

GPU; VRAM; CPU utilization; SVP index

424*240 - 23% (65% compute_1); 0.9 GB; zero; 1.0
640*360 - 9% (100% compute_1); 0.9 GB; zero; 0.76

https://www.svp-team.com/forum/viewtopi … 96&p=2

Above is an example of data that would satisfy me.

Of course now we need some kind of confirmation for the 3x faster filter:
SVP+RIFE filter for VapourSynth (PyTorch)

and the fastest RIFE model 3.8
with scale=1

Chainik, were you able to do real-time interpolation with this newer vs-rife filter?