Skip to content

Commit

Permalink
rife-v4.20 (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
TNTwise authored Jul 24, 2024
1 parent 571bf73 commit a2b41b4
Show file tree
Hide file tree
Showing 6 changed files with 962 additions and 7 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,13 @@ By default models are exported with ensemble=False and Fast=True
- 58 = rife-v4.18 (ensemble=True)
- 59 = rife-v4.19-beta (ensemble=False)
- 60 = rife-v4.19-beta (ensemble=True)
- 61 = rife-v4.20 (ensemble=False)
- 62 = rife-v4.20 (ensemble=True)
## My experimental custom models (only works with 2x)

- 61 = sudo_rife4 (ensemble=False / fast=True)
- 62 = sudo_rife4 (ensemble=True / fast=False)
- 63 = sudo_rife4 (ensemble=True / fast=True)
- 63 = sudo_rife4 (ensemble=False / fast=True)
- 64 = sudo_rife4 (ensemble=True / fast=False)
- 65 = sudo_rife4 (ensemble=True / fast=True)

- factor_num, factor_den: Factor of target frame rate. For example `factor_num=5, factor_den=2` will multiply input clip FPS by 2.5. Only rife-v4 model supports custom frame rate.

Expand Down
14 changes: 10 additions & 4 deletions RIFE/plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,8 @@ static void VS_CC rifeCreate(const VSMap* in, VSMap* out, [[maybe_unused]] void*
if (err)
d->skipThreshold = 60.0;

if (model < 0 || model > 63)
throw "model must be between 0 and 63 (inclusive)";
if (model < 0 || model > 65)
throw "model must be between 0 and 65 (inclusive)";

if (factorNum < 1)
throw "factor_num must be at least 1";
Expand Down Expand Up @@ -469,12 +469,18 @@ static void VS_CC rifeCreate(const VSMap* in, VSMap* out, [[maybe_unused]] void*
modelPath += "/rife-v4.19_beta_ensembleTrue";
break;
case 61:
modelPath += "/sudo_rife4_ensembleFalse_fastTrue";
modelPath += "/rife-v4.20_ensembleFalse";
break;
case 62:
modelPath += "/sudo_rife4_ensembleTrue_fastFalse";
modelPath += "/rife-v4.20_ensembleTrue";
break;
case 63:
modelPath += "/sudo_rife4_ensembleFalse_fastTrue";
break;
case 64:
modelPath += "/sudo_rife4_ensembleTrue_fastFalse";
break;
case 65:
modelPath += "/sudo_rife4_ensembleTrue_fastTrue";
break;

Expand Down
Binary file added models/rife-v4.20_ensembleFalse/flownet.bin
Binary file not shown.
Loading

0 comments on commit a2b41b4

Please sign in to comment.