Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there rife for motion interpolation like vs-mlrt yet? #12

Closed
Usulyre opened this issue Feb 26, 2024 · 14 comments
Closed

Is there rife for motion interpolation like vs-mlrt yet? #12

Usulyre opened this issue Feb 26, 2024 · 14 comments

Comments

@Usulyre
Copy link

Usulyre commented Feb 26, 2024

Hi,

Is there rife for motion interpolation like vs-mlrt yet?

Like the example here but for avs-mlrt:

AmusementClub/vs-mlrt#47

@Asd-g
Copy link
Owner

Asd-g commented Feb 28, 2024

Not, yet. Running RIFE with avs-mlrt requires some additional work.

Asd-g added a commit that referenced this issue May 8, 2024
@Asd-g
Copy link
Owner

Asd-g commented May 9, 2024

Added.

@Asd-g Asd-g closed this as completed May 9, 2024
@Usulyre
Copy link
Author

Usulyre commented Aug 17, 2024

Added.

Just wondering when a new release will come out with the above ?

@Asd-g
Copy link
Owner

Asd-g commented Aug 17, 2024

Sorry for the delay. Later I will create a new release.

@Asd-g
Copy link
Owner

Asd-g commented Aug 18, 2024

@Usulyre, until I create release, you can download these scripts - https://github.com/Asd-g/avs-mlrt/blob/main/scripts/mlrt_common.avsi and https://github.com/Asd-g/avs-mlrt/blob/main/scripts/mlrt_RIFE.avsi. Open mlrt_RIFE.avsi and read the info. You can download models from here. Take a note of the location of of the models.
Use the latest mlrt_ov/mlrt_ort - https://github.com/Asd-g/avs-mlrt/releases/tag/r63

@Usulyre
Copy link
Author

Usulyre commented Aug 19, 2024

@Usulyre, until I create release, you can download these scripts - https://github.com/Asd-g/avs-mlrt/blob/main/scripts/mlrt_common.avsi and https://github.com/Asd-g/avs-mlrt/blob/main/scripts/mlrt_RIFE.avsi. Open mlrt_RIFE.avsi and read the info. You can download models from here. Take a note of the location of of the models. Use the latest mlrt_ov/mlrt_ort - https://github.com/Asd-g/avs-mlrt/releases/tag/r63

Hi, after following your steps and getting past some errors, it seems to work.

However, gpu usage is nearly 0% and my cpu is using almost 100%?

I must have configured something wrong or not at all.

@Usulyre
Copy link
Author

Usulyre commented Aug 19, 2024

I have avisynth+ 3.7.3 and a GTX 1060

Steps:

Downloaded https://github.com/Asd-g/avs-mlrt/blob/main/scripts/mlrt_common.avsi and put in my avisynth+ plugins64+ folder.

Downloaded https://github.com/Asd-g/avs-mlrt/blob/main/scripts/mlrt_RIFE.avsi and put in my avisynth+ plugins64+ folder.

Downloaded avsresize

https://web.archive.org/web/20230215081928if_/https://files.videohelp.com/u/223002/avsresize_r21.7z

extracted x64 dll and put into in my avisynth+ plugins64+ folder

Downloaded framesel

https://web.archive.org/web/20200526164026if_/https://files.videohelp.com/u/223002/FrameSel_x86_
x64_dll_v2-20_20180420.zip

Extracted avisynth+ 64, FrameSel_x64.dll and put into in my avisynth+ plugins64+ folder.

Donwloaded a couple of models from:

https://github.com/AmusementClub/vs-mlrt/releases/tag/external-models

rife_v4.22.7z and rife_v4.17_lite.7z

Extracted files and put into avisynth+ plugins64+ folder as

"or implementation=1: models must be placed in folder "models/rife_mlrt/rife" where the root folder "models" must be in the same location as mlrt_xxx.dll."

"or implementation=2: models must be placed in folder "models/rife_mlrt/rife_v2" where the root folder "models" must be in the same location as mlrt_xxx.dll."

According to https://github.com/Asd-g/avs-mlrt/blob/main/mlrt_ort/README.md

Downloaded

mlrt_ort-1.0.1.7z and extracted/put mlrt_ort.dll and mlrt.avsi into avisynth+ plugins64+ folder.

Created folder mlrt_ort_rt and put onnxruntime.dll and DirectML.dll and all the files in cuda_dll.7 z into that folder which i put into avisynth+ plugins64+ folder.

Had to edit in the file mlrt_RIFE.avsi line 105

Assert(model >= 0 && model <= 19, "mlrt_RIFE: model must be between 0..19.")
into

Assert(model >= 0 && model <= 26, "mlrt_RIFE: model must be between 0..26.")

I used the newer models like 4.17 and 4.22 and I got an error so I changed it to 26 since 19 is model 4.16

Also had to change for example "rife_v4.22.onnx" to "rife_v4_22.onnx" because I also got an error.

Sample script:

AvsFilterSource()
SetFilterMTMode("DEFAULT_MT_MODE", MT_MULTI_INSTANCE)
Threads=2
SR(320,320)
FDecimate2(24, chroma=false)
ConvertBits(32).ConvertToPlanarRGB(matrix="Rec601")
mlrt_RIFE(1, factor_num=2, factor_den=1, model=26, backend=["ort", "fp16=true"], ensemble=false)
ConvertBits(8).ConvertToYV12(matrix="Rec601")
Prefetch(Threads)

Do i need to change something to get it to use my gpu?

Like in mlrt_ort ?

Does mlrt_ort need it's own script as well?

@Asd-g
Copy link
Owner

Asd-g commented Aug 19, 2024

Try with mlrt_RIFE(1, factor_num=2, factor_den=1, model=26, backend=["ort", """provider="cuda"""", "fp16=true"], ensemble=false).

Remove mlrt.avsi. It's obsolete. The functions from it are now in own scripts (mlrt_DPIR.avsi, mlrt_RIFE.avsi...).

@Usulyre
Copy link
Author

Usulyre commented Aug 20, 2024

Try with mlrt_RIFE(1, factor_num=2, factor_den=1, model=26, backend=["ort", """provider="cuda"""", "fp16=true"], ensemble=false).

Remove mlrt.avsi. It's obsolete. The functions from it are now in own scripts (mlrt_DPIR.avsi, mlrt_RIFE.avsi...).

That works now, thanks.

Will you be adding (if possible) a parameter like this:

fps_num, fps_den

for specifying an exact frame rate, like what AviSynthPlus-RIFE has already?

@Asd-g
Copy link
Owner

Asd-g commented Aug 20, 2024

Try the latest version of mlrt_RIFE.avsi.

Btw what's the speed diff between mlrt_RIFE and RIFE with your NVIDIA card?

@Usulyre
Copy link
Author

Usulyre commented Aug 21, 2024

Try the latest version of mlrt_RIFE.avsi.

Btw what's the speed diff between mlrt_RIFE and RIFE with your NVIDIA card?

Thanks for that.

How would I go about testing the speed difference between the two?

@Asd-g
Copy link
Owner

Asd-g commented Aug 21, 2024

You can use AVSMeter.

@Usulyre
Copy link
Author

Usulyre commented Aug 21, 2024

You can use AVSMeter.

Ok, not sure I did it right but here are the two logs:

mlrt_RIFE:

mlrt_rife.log

RIFE:

rife.log

@Asd-g
Copy link
Owner

Asd-g commented Aug 21, 2024

Thanks. RIFE is faster than mlrt_RIFE in this test (55.8 fps vs 45.10).

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

No branches or pull requests

2 participants