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

dawkinscm wrote:
Fortune424 wrote:

I think I can confirm. It really is painfully obvious when you do a side by side comparison. I bet V2 looks worse than the 1080P BluRay would. I guess the free performance boost was too good to be true, for now.

Here's from the opening of the 4K BluRay of Avatar 2:

MPV with stock SVP settings, RIFE 4.6 w/ TensorRT on a 3090.

I don't think it does look worse than a 1080 BluRay. I use VR to watch 3D and as far as I can tell, I don't get the same issues. Maybe there's a resolution issue, but I checked and all the detail is there when compared to the original Blu-ray when using Rife v2 with no quality difference to Rife v1. I also checked a number of difficult scenes from other movies and the same applies there too. So maybe it's a 4K resolution issue but I'm not interested in 4K playback using SVP so I haven't tried that. Stock MPV settings uses gpu and I do notice a marked improvement in quality when using gpu-next with proper configuration so you may wish to try that as well.

You can see in our screenshots that SOMETHING is wrong. It looks a lot more jagged and low res with V2 enabled. It is entirely possible it's only at 4K though. I didn't notice a problem at 1080P, though there is less detail there to begin with so who knows. At this point I'm just going to stick with V1 personally, until the cause is revealed or it is fixed.

752 (edited by dawkinscm 11-04-2023 09:07:22)

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

Fortune424 wrote:
dawkinscm wrote:
Fortune424 wrote:

I think I can confirm. It really is painfully obvious when you do a side by side comparison. I bet V2 looks worse than the 1080P BluRay would. I guess the free performance boost was too good to be true, for now.

Here's from the opening of the 4K BluRay of Avatar 2:

MPV with stock SVP settings, RIFE 4.6 w/ TensorRT on a 3090.

I don't think it does look worse than a 1080 BluRay. I use VR to watch 3D and as far as I can tell, I don't get the same issues. Maybe there's a resolution issue, but I checked and all the detail is there when compared to the original Blu-ray when using Rife v2 with no quality difference to Rife v1. I also checked a number of difficult scenes from other movies and the same applies there too. So maybe it's a 4K resolution issue but I'm not interested in 4K playback using SVP so I haven't tried that. Stock MPV settings uses gpu and I do notice a marked improvement in quality when using gpu-next with proper configuration so you may wish to try that as well.

You can see in our screenshots that SOMETHING is wrong. It looks a lot more jagged and low res with V2 enabled. It is entirely possible it's only at 4K though. I didn't notice a problem at 1080P, though there is less detail there to begin with so who knows. At this point I'm just going to stick with V1 personally, until the cause is revealed or it is fixed.

Yeah it's clear that there is an issue with aliasing which is one of those things that once you see it you can't unsee it. My MPV config is almost identical to my MadVR config and I've found that the Jinc algorithm works best for both in terms of anti-aliasing.

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

Fortune424 wrote:

To anyone confused, these are the full instructions to get the best setup going right now as far as I am aware. Please correct me if I'm wrong. With all due respect to Chainik, I think they're too smart and could benefit from giving a little more detail in the instructions for us non-developers.

1. Install SVP - select whatever player you want, I'm using MPV because back in the previous pages people claimed it was faster than MPC-HC/BE.
2. Go to Utilities -> Additional Programs and Features
3. Install the RIFE AI thing and the Tensor RT thing at the bottom. I also chose MPV Shared Libraries, not sure if it matters.
4. Restart the program.
5. Download the V2 model folder from here. https://github.com/AmusementClub/vs-mlr … e_v2_v1.7z SEE FOOTNOTE - MAYBE STOP HERE FOR NOW
6. Extract the "rife_V2" folder into your models folder (SVP 4\rife\models) so it sits beside the "rife" folder.
7. You should have a path like "C:\Program Files (x86)\SVP 4\rife\models\rife_v2\rife_v4.6.onnx" when this is done.
8. Download the updated vsmlsrt.py from here: https://www.svp-team.com/forum/misc.php … download=1
9. Replace "SVP 4\rife\vsmlrt.py"
10. Restart SVP 4.
11. Now you can select your settings as before. This seems optimal for me:
https://i.imgur.com/5UpwsF7.png
12. The thing here that confused me is that you don't have to select the V2 model specifically. It seems like SVP chooses the V2 model automatically if the folder structure exists like that. So you'll be using the non-ensemble V2 rife 4.6 model by default if you have your thing set up like mine.
13. I'm doing x3 for 21:9 1080P and below, and x2 for 4K and 16:9 1080P. Seems to work okay with a 3090 though I've only tested a couple videos, I'll report back.
14. The threads doesn't seem to make much of a difference.

Thank you to Chainik and the SVP team (IS there a team?) for making a great program, and thanks to UHD and everyone else who has contributed to this thread. The RIFE interpolation looks so good. I look forward to seeing it progress, and eagerly await the theoretical RTX 5090. Told myself I'd sit out this current generation now that GPUs cost more than my first car.

---



NOTE: If you read further down, we've determined V2 may be substantially reducing visual quality (at least at 4K). Recommend sticking with the out of the box RIFE model configuration for now. (V1 4.6 + TensorRT + performance boost).



---

Do I need replace the updated vsmlsrt.py if I don't use V2?

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

zxcvbnm821 wrote:
Fortune424 wrote:

To anyone confused, these are the full instructions to get the best setup going right now as far as I am aware. Please correct me if I'm wrong. With all due respect to Chainik, I think they're too smart and could benefit from giving a little more detail in the instructions for us non-developers.

1. Install SVP - select whatever player you want, I'm using MPV because back in the previous pages people claimed it was faster than MPC-HC/BE.
2. Go to Utilities -> Additional Programs and Features
3. Install the RIFE AI thing and the Tensor RT thing at the bottom. I also chose MPV Shared Libraries, not sure if it matters.
4. Restart the program.
5. Download the V2 model folder from here. https://github.com/AmusementClub/vs-mlr … e_v2_v1.7z SEE FOOTNOTE - MAYBE STOP HERE FOR NOW
6. Extract the "rife_V2" folder into your models folder (SVP 4\rife\models) so it sits beside the "rife" folder.
7. You should have a path like "C:\Program Files (x86)\SVP 4\rife\models\rife_v2\rife_v4.6.onnx" when this is done.
8. Download the updated vsmlsrt.py from here: https://www.svp-team.com/forum/misc.php … download=1
9. Replace "SVP 4\rife\vsmlrt.py"
10. Restart SVP 4.
11. Now you can select your settings as before. This seems optimal for me:
https://i.imgur.com/5UpwsF7.png
12. The thing here that confused me is that you don't have to select the V2 model specifically. It seems like SVP chooses the V2 model automatically if the folder structure exists like that. So you'll be using the non-ensemble V2 rife 4.6 model by default if you have your thing set up like mine.
13. I'm doing x3 for 21:9 1080P and below, and x2 for 4K and 16:9 1080P. Seems to work okay with a 3090 though I've only tested a couple videos, I'll report back.
14. The threads doesn't seem to make much of a difference.

Thank you to Chainik and the SVP team (IS there a team?) for making a great program, and thanks to UHD and everyone else who has contributed to this thread. The RIFE interpolation looks so good. I look forward to seeing it progress, and eagerly await the theoretical RTX 5090. Told myself I'd sit out this current generation now that GPUs cost more than my first car.

---



NOTE: If you read further down, we've determined V2 may be substantially reducing visual quality (at least at 4K). Recommend sticking with the out of the box RIFE model configuration for now. (V1 4.6 + TensorRT + performance boost).



---

Do I need replace the updated vsmlsrt.py if I don't use V2?

No, that's only necessary if you're using V2.

Although now that you mention it, I never recovered the original vsmlsrt.py when I downgraded to V1... so maybe someone can chime in on what exactly the change IS. Because apparently the new vsmlsrt.py works with the V1 model as well.

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

zxcvbnm821 wrote:

Do I need replace the updated vsmlsrt.py if I don't use V2?

you only need to remove the V2 model

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

I tested with more videos, looks like V2 only looks bad on 4k video. 1440p looks fine.
so maybe we can use V1 for 4k video, and V2 for 2k and below.

757

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

I also confirm that for RIFE v2 4K video looks like a pixel grid. v1 doesn't have this problem.

758 (edited by Fortune424 13-04-2023 15:18:51)

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

Fortune424 wrote:

The annoying thing about the performance boost for me has been movies that use multiple aspect ratios / resolutions. For example I'm watching Resident Evil (2002) BluRay right now and there's a 16:9 camera, an almost 16:9 camera, a 21:9 camera, 4:3 CGI for the computer vision/security camera stuff, etc. It has stopped to generate the training info a few times. For anime/web content it's not so bad - you've basically just got 21:9 and 16:9 versions of 480P through 4K and then the occasional portrait/4:3 video.

As an aside, I just realized that this is because of SVP's black bar detection. If you disable black bar detection, the number of possible resolutions you need to pre-cache the RIFE info for will decrease... but apparently the reason that exists in the first place is because SVP thinks the bars are part of the video to interpolate if they're NOT removed, so it sounds like you'd be giving up some quality there if you choose to leave it off.

Also, it seems like by default SVP decreases videos to your screen resolution before interpolating. Makes sense, and doesn't matter if you're on a 4K screen (unless you're doing 8K videos I guess), but it means that anyone with a 1440P screen trying to test 4K interpolation speed isn't REALLY testing 4K interpolation speed unless they turn that setting off:

https://i.imgur.com/Ie4xg3R.png

759 (edited by dawkinscm 13-04-2023 15:09:05)

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

Fortune424 wrote:
Fortune424 wrote:

The annoying thing about the performance boost for me has been movies that use multiple aspect ratios / resolutions. For example I'm watching Resident Evil (2002) BluRay right now and there's a 16:9 camera, an almost 16:9 camera, a 21:9 camera, 4:3 CGI for the computer vision/security camera stuff, etc. It has stopped to generate the training info a few times. For anime/web content it's not so bad - you've basically just got 21:9 and 16:9 versions of 480P through 4K and then the occasional portrait/4:3 video.

As an aside, I just realized that this is because of SVP's black bar detection. If you disable black bar detection, the number of possible resolutions you need to pre-cache the RIFE info for will decrease... but apparently the reason that exists in the first place is because SVP thinks the bars are part of the video to interpolate if they're NOT removed, so it sounds like you'd be giving up some quality there if you choose to leave it off.

The black bar detection was annoying even before Rife and caused me nothing but trouble. As for interpolating black bars, that makes no sense to me and if there was some kind of weird picture quality issue then they should mention it. But as I said, that would be weird.

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

Does decrease to hd setting have an effect on smoothness or is it just lowering the video quality ? I fell like original video feels smoother than the one with decrease to hd setting.

761 (edited by Fortune424 14-04-2023 21:45:50)

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

cemaydnlar wrote:

Does decrease to hd setting have an effect on smoothness or is it just lowering the video quality ? I fell like original video feels smoother than the one with decrease to hd setting.

That button reduces the video to 720P. I can't imagine any situation where it would make sense to use it. It may be that the resolution of the video plays a role in how well the algorithms work, but as far as I know it just uses some kind of cheap scaler to resize the video to 1280x720 before SVP interpolates it.

762 (edited by dawkinscm 14-04-2023 21:48:23)

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

Fortune424 wrote:
cemaydnlar wrote:

Does decrease to hd setting have an effect on smoothness or is it just lowering the video quality ? I fell like original video feels smoother than the one with decrease to hd setting.

That button reduces the video to 720P. I can't imagine any situation where it would make sense to use it. It may be that the resolution of the video plays a role in how well the algorithms work, but as far as I know it just uses some kind of cheap scaler to resize the video to 1280x720 before SVP interpolates it.

Whatever scaler it uses it's unlikely to be better than the kind of scalers you can choose with MPV. I would rather choose my own scaler so that I know the quality I am getting.

763 (edited by cemaydnlar 14-04-2023 22:22:33)

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

I am watching 1080p anime on a 1080p monitor. Reducing the video quality to 720p doesn't get worse than 1080p plus it gives me the opportunity to use x5 or x6 instead of x3. For rife the best 2 settings are x3 and x5. Since x5 is a lot smoother than x3 it is better for me to use it. I made a couple of tests now and i can clearly see that decreasing to 720p has no negative effect on video smoothness.

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

Hello,

Not sure how everyone is able to play on x3 in 4K, for some reason, on my end I have a "jumpy" playback on x3 while using RIFE and playing 2k video in 4k resolution. When playing the video, it feels as if it is skipping frames. Is there something wrong with my setup? Any suggestions would be highly appreciated, I am kinda new to SVP.

System Specs: 13900k, 4090, 64Gb DDR5 6200, 4K display 60hz 8 bpc

File properties:

File size                      : 18.4 GiB
Duration                       : 2 h 4 min
Overall bit rate               : 21.2 Mb/s
Writing application            : mkvmerge v75.0.0 ('Goliath') 64-bit
Writing library                : libebml v1.4.4 + libmatroska v1.7.1

Video
ID                             : 1
Format                         : HEVC
Format/Info                    : High Efficiency Video Coding
Format profile                 : Main 10@L5@High
Codec ID                       : V_MPEGH/ISO/HEVC
Duration                       : 2 h 4 min
Bit rate                       : 20.4 Mb/s
Width                          : 3 840 pixels
Height                         : 1 608 pixels
Display aspect ratio           : 2.40:1
Frame rate mode                : Constant
Frame rate                     : 23.976 FPS
Color space                    : YUV
Chroma subsampling             : 4:2:0
Bit depth                      : 10 bits
Bits/(Pixel*Frame)             : 0.138
Stream size                    : 17.8 GiB (96%)
Language                       : English
Default                        : Yes
Forced                         : No

SVP settings:
https://i.imgur.com/lPhLVgU.png

765 (edited by Blackfyre 19-04-2023 06:54:26)

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

Sopheus wrote:

Not sure how everyone is able to play on x3 in 4K

Here's your issue.

Sopheus wrote:

4K display 60hz 8 bpc

You're trying to play over the display refresh rate, I haven't done that myself as I only have an RTX 3090, but I have an LG C2 OLED, so it is running at 120Hz.

If your 4K Display is only 60Hz, I recommend you switch to 50Hz for 24 and 25 FPS videos. Keep RIFE at Movie 2X and test my settings for your MPV Configuration:

ontop
fullscreen=yes
d3d11-exclusive-fs=yes

volume=100
volume-max=100

vo=gpu-next
gpu-api=d3d11
hwdec=d3d11va
gpu-context=d3d11
drm-vrr-enabled=no
d3d11-sync-interval=1

dither=error-diffusion
error-diffusion=burkes
dither-depth=10
video-sync=audio
spirv-compiler=auto

dolbyvision=yes
tone-mapping=auto
hdr-compute-peak=yes
target-colorspace-hint
tone-mapping-mode=auto
tone-mapping-param=auto

scale=ewa_lanczos
cscale=ewa_lanczos
dscale=ewa_lanczos
tscale=ewa_lanczos

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

Blackfyre wrote:
Sopheus wrote:

Not sure how everyone is able to play on x3 in 4K

Here's your issue.

Sopheus wrote:

4K display 60hz 8 bpc

You're trying to play over the display refresh rate, I haven't done that myself as I only have an RTX 3090, but I have an LG C2 OLED, so it is running at 120Hz.

If your 4K Display is only 60Hz, I recommend you switch to 50Hz for 24 and 25 FPS videos. Keep RIFE at Movie 2X and test my settings for your MPV Configuration:

ontop
fullscreen=yes
d3d11-exclusive-fs=yes

volume=100
volume-max=100

vo=gpu-next
gpu-api=d3d11
hwdec=d3d11va
gpu-context=d3d11
drm-vrr-enabled=no
d3d11-sync-interval=1

dither=error-diffusion
error-diffusion=burkes
dither-depth=10
video-sync=audio
spirv-compiler=auto

dolbyvision=yes
tone-mapping=auto
hdr-compute-peak=yes
target-colorspace-hint
tone-mapping-mode=auto
tone-mapping-param=auto

scale=ewa_lanczos
cscale=ewa_lanczos
dscale=ewa_lanczos
tscale=ewa_lanczos

Works like a charm, thank you man!

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

Blackfyre wrote:
Sopheus wrote:

Not sure how everyone is able to play on x3 in 4K

Here's your issue.

2.5X should work too I think.

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

Hello everyone, would it be better for RIFE to enable NVIDIA Optical Flow?

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

zxcvbnm821 wrote:

Hello everyone, would it be better for RIFE to enable NVIDIA Optical Flow?

Doesn't matter, because it does not use nVidia Optical Flow.

NVOF can be used outside of RIFE, but it's not as good as RIFE. I was using it before switching to RIFE after I got my RTX 3090.

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

UHD wrote:

If anyone is interested in much, much better quality than RIFE interpolation I will write about it soon, here on this forum. Please give me another week, maybe two weeks, until I update my repository on GitHub.

2 weeks are up, UHD! Time to spill the beans, don't keep us boiling here roll

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

Xenocyde wrote:
UHD wrote:

If anyone is interested in much, much better quality than RIFE interpolation I will write about it soon, here on this forum. Please give me another week, maybe two weeks, until I update my repository on GitHub.

2 weeks are up, UHD! Time to spill the beans, don't keep us boiling here roll

He will post when he is ready. No rush, take your time.

772

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

Xenocyde wrote:
UHD wrote:

If anyone is interested in much, much better quality than RIFE interpolation I will write about it soon, here on this forum. Please give me another week, maybe two weeks, until I update my repository on GitHub.

2 weeks are up, UHD! Time to spill the beans, don't keep us boiling here roll

Thanks for remembering. Sorry, some unforeseen work-related overtime fell out. I'll be back with information by the end of April for sure.

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

UHD wrote:
Xenocyde wrote:
UHD wrote:

If anyone is interested in much, much better quality than RIFE interpolation I will write about it soon, here on this forum. Please give me another week, maybe two weeks, until I update my repository on GitHub.

2 weeks are up, UHD! Time to spill the beans, don't keep us boiling here roll

I'll be back with information by the end of April for sure.

I understand you are most likely busy, but May is here.

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

Chainik wrote:

=== RIFE / PyTorch+TensorRT installation ===

DO NOT DO THIS!
You DON'T NEED IT!
I'm SERIOUS! big_smile

============

!!! Advanced users only, if you don't know what this is all about - you don't need it !!!

0. Update SVP via online updater (this will update Python to ver. 3.10.9)

1. Dependencies installation:
--------------
Download TensorRT libs: https://github.com/HolyWu/vs-rife/relea … 2_win64.7z
unpack CUDA-blah-blah.7z to SVP 4\mpv64

run cmd as Administrator

cd SVP 4\mpv64

python get-pip.py

python -m pip install torch torchvision --extra-index-url https://download.pytorch.org/whl/cu117
python -m pip install tensorrt-8.5.2.2-cp310-none-win_amd64.whl
python -m pip install torch-tensorrt-fx-only tqdm
python -m pip install -U --no-deps vsrife
python -m vsrife

A quick fix for vsrife's "slowmo" bug: replace __init__.py in SVP 4\mpv64\Lib\site-packages\vsrife\


2. SVP modification
---------------
Replace SVP 4\script\generate.js and base.py with the attached ones

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.

----------------
For a given video resolution the first-time start is super-slow (while it generates TRT net in a cache folder --> %APPDATA%\SVP4\cache\trt), so better do it in a "transcoding" mode.


Hi, I got an error "RIFE: cuda is not available" when using this with MPC-BE?

775

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

Some newbie questions here :

Owner of a rtx3080 12600k, I like the smoothness SVP can get me, but sometimes artifacts are annoying.

What can I expect from this rife ai engine ? is it worth the time to set it up ? I'm watching movies on an ultrawide HDR display 3440x1440, usually x5 frames per sec. (and I don't know if its revelant but my movies are 4k and about 30/50 Gb per movie.