mirror of
https://github.com/n00mkrad/flowframes.git
synced 2026-07-12 05:26:12 +02:00
better implementation that works for all three AIs
This commit is contained in:
@@ -96,25 +96,10 @@ namespace Flowframes.Main
|
||||
|
||||
public static void UpdateLastFrameFromInterpOutput(string output)
|
||||
{
|
||||
switch (AiProcess.currentAiName)
|
||||
{
|
||||
case "RIFE-CUDA":
|
||||
{
|
||||
Regex frameRegex = new Regex($@"(?<=> )\d*(?=.{GetOutExt()})");
|
||||
if (!frameRegex.IsMatch(output)) return;
|
||||
lastFrame = int.Parse(frameRegex.Match(output).Value);
|
||||
break;
|
||||
}
|
||||
case "RIFE-NCNN":
|
||||
{
|
||||
break;
|
||||
}
|
||||
case "DAIN":
|
||||
{
|
||||
break;
|
||||
}
|
||||
default: return;
|
||||
}
|
||||
string dainStr = AiProcess.currentAiName == "DAIN" ? " done" : "";
|
||||
Regex frameRegex = new Regex($@"(?<=.)\d*(?=.{GetOutExt()}{dainStr})");
|
||||
if (!frameRegex.IsMatch(output)) return;
|
||||
lastFrame = Math.Max(int.Parse(frameRegex.Match(output).Value), lastFrame);
|
||||
}
|
||||
|
||||
public static int interpolatedInputFramesCount;
|
||||
|
||||
@@ -93,7 +93,7 @@ namespace Flowframes
|
||||
if(Interpolate.currentlyUsingAutoEnc) // Ensure AutoEnc is not paused
|
||||
AutoEncode.paused = false;
|
||||
|
||||
currentAiName = "RIFE-CUDA";
|
||||
currentAiName = "RIFE";
|
||||
|
||||
string rifeDir = Path.Combine(Paths.GetPkgPath(), Path.GetFileNameWithoutExtension(Packages.rifeCuda.fileName));
|
||||
string script = "rife.py";
|
||||
@@ -154,7 +154,7 @@ namespace Flowframes
|
||||
processTimeMulti.Restart();
|
||||
Logger.Log($"Running RIFE{(await InterpolateUtils.UseUHD() ? " (UHD Mode)" : "")}...", false);
|
||||
|
||||
currentAiName = "RIFE-NCNN";
|
||||
currentAiName = "RIFE";
|
||||
|
||||
await RunRifeNcnnMulti(framesPath, outPath, factor, mdl);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user