Skip to content

Commit

Permalink
Fix model downloader not running when using rt
Browse files Browse the repository at this point in the history
  • Loading branch information
n00mkrad committed Sep 14, 2022
1 parent 6e40c6a commit 863b321
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
9 changes: 9 additions & 0 deletions Code/Main/Interpolate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,20 @@ public static async Task Done()

public static async Task Realtime ()
{
canceled = false;

Program.mainForm.SetWorking(true);

if(currentSettings.ai.NameInternal != Implementations.rifeNcnnVs.NameInternal)
Cancel($"Real-time interpolation is only available when using {Implementations.rifeNcnnVs.FriendlyName}.");

if (canceled) return;

Program.mainForm.SetStatus("Downloading models...");
await ModelDownloader.DownloadModelFiles(currentSettings.ai, currentSettings.model.Dir);

if (canceled) return;

await AiProcess.RunRifeNcnnVs(currentSettings.framesFolder, "", currentSettings.interpFactor, currentSettings.model.Dir, true);
Program.mainForm.SetWorking(false);
}
Expand Down
3 changes: 2 additions & 1 deletion Pkgs/rife-ncnn-vs/models.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"name": "RIFE 2.3",
"desc": "Old Model",
"dir": "rife-v2.3",
"isDefault": "false",
"fixedFactors": [2]
},
{
Expand All @@ -15,7 +16,7 @@
"name": "RIFE 4.3",
"desc": "New Fast General Model",
"dir": "rife-v4.3",
"isDefault": "true"
"isDefault": "false"
},
{
"name": "RIFE 4.4",
Expand Down

0 comments on commit 863b321

Please sign in to comment.