From 63da55cf6c7cac6652af18f0493de1175b9cc2dc Mon Sep 17 00:00:00 2001 From: N00MKRAD Date: Tue, 9 Feb 2021 18:23:22 +0100 Subject: [PATCH] Ensure AutoEnc is not paused from prev run when starting interpolation --- Code/Main/AutoEncode.cs | 1 - Code/OS/AiProcess.cs | 8 ++++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Code/Main/AutoEncode.cs b/Code/Main/AutoEncode.cs index dc364f8..3a5af3b 100644 --- a/Code/Main/AutoEncode.cs +++ b/Code/Main/AutoEncode.cs @@ -63,7 +63,6 @@ namespace Flowframes.Main if (paused) { - //Logger.Log("autoenc paused"); await Task.Delay(200); continue; } diff --git a/Code/OS/AiProcess.cs b/Code/OS/AiProcess.cs index bce0175..518df1d 100644 --- a/Code/OS/AiProcess.cs +++ b/Code/OS/AiProcess.cs @@ -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)