Ensure AutoEnc is not paused from prev run when starting interpolation

This commit is contained in:
N00MKRAD
2021-02-09 18:23:22 +01:00
parent 925902889d
commit 63da55cf6c
2 changed files with 8 additions and 1 deletions

View File

@@ -63,7 +63,6 @@ namespace Flowframes.Main
if (paused)
{
//Logger.Log("autoenc paused");
await Task.Delay(200);
continue;
}

View File

@@ -89,6 +89,9 @@ namespace Flowframes
public static async Task RunRifeCuda(string framesPath, float interpFactor, string mdl)
{
if(Interpolate.currentlyUsingAutoEnc) // Ensure AutoEnc is not paused
AutoEncode.paused = false;
string rifeDir = Path.Combine(Paths.GetPkgPath(), Path.GetFileNameWithoutExtension(Packages.rifeCuda.fileName));
string script = "rife.py";
@@ -165,6 +168,8 @@ namespace Flowframes
if (times > 1)
AutoEncode.paused = true; // Disable autoenc until the last iteration
else
AutoEncode.paused = false;
for (int iteration = 1; iteration <= times; iteration++)
{
@@ -222,6 +227,9 @@ namespace Flowframes
public static async Task RunDainNcnn(string framesPath, string outPath, float factor, string mdl, int tilesize)
{
if (Interpolate.currentlyUsingAutoEnc) // Ensure AutoEnc is not paused
AutoEncode.paused = false;
await RunDainNcnnProcess(framesPath, outPath, factor, mdl, tilesize);
if (!Interpolate.canceled && Interpolate.current.alpha)