diff --git a/Code/Magick/Dedupe.cs b/Code/Magick/Dedupe.cs index 0023b62..bfbce93 100644 --- a/Code/Magick/Dedupe.cs +++ b/Code/Magick/Dedupe.cs @@ -229,9 +229,6 @@ namespace Flowframes.Magick if(debug) Logger.Log($"{(isLastItem ? "[isLastItem] " : "")}frameNum1 (frameFiles[{i}]) = {frameNum1}, frameNum2 (frameFiles[{i+1}]) = {frameNum2} => dupes = {dupes}", true, false, "dupes"); - //if (File.Exists(Path.Combine(framesPath.GetParentDir(), Paths.scenesDir, frameFiles[i].Name))) - // dupes = 0; - fileContent += $"{Path.GetFileNameWithoutExtension(frameFiles[i].Name)}:{dupes}\n"; } diff --git a/Code/Main/Interpolate.cs b/Code/Main/Interpolate.cs index ab6ad15..54b4ff8 100644 --- a/Code/Main/Interpolate.cs +++ b/Code/Main/Interpolate.cs @@ -64,7 +64,7 @@ namespace Flowframes await CreateVideo.Export(current.interpFolder, current.outPath, current.outMode, false); if (Config.GetBool("keepTempFolder")) - await FrameRename.Unrename(); + await Task.Run(async () => { await FrameRename.Unrename(); }); await Cleanup(); Program.mainForm.SetWorking(false); @@ -142,6 +142,8 @@ namespace Flowframes { if (canceled) return; + Program.mainForm.SetStatus("Processing frames..."); + int extractedFrames = IOUtils.GetAmountOfFiles(current.framesFolder, false, "*" + current.framesExt); if (!Directory.Exists(current.framesFolder) || currentInputFrameCount <= 0 || extractedFrames < 2) { @@ -189,9 +191,10 @@ namespace Flowframes public static async Task RunAi(string outpath, AI ai, bool stepByStep = false) { if (canceled) return; - await Dedupe.CreateDupesFile(current.framesFolder, currentInputFrameCount, current.framesExt); - await FrameRename.Rename(); - await FrameOrder.CreateFrameOrderFile(current.framesFolder, Config.GetBool("enableLoop"), current.interpFactor); + + await Task.Run(async () => { await Dedupe.CreateDupesFile(current.framesFolder, currentInputFrameCount, current.framesExt); }); + await Task.Run(async () => { await FrameRename.Rename(); }); + await Task.Run(async () => { await FrameOrder.CreateFrameOrderFile(current.framesFolder, Config.GetBool("enableLoop"), current.interpFactor); }); Program.mainForm.SetStatus("Downloading models..."); await ModelDownloader.DownloadModelFiles(ai.pkgDir, current.model); diff --git a/Code/Main/InterpolateSteps.cs b/Code/Main/InterpolateSteps.cs index b1b0e53..2ae5f8d 100644 --- a/Code/Main/InterpolateSteps.cs +++ b/Code/Main/InterpolateSteps.cs @@ -94,7 +94,7 @@ namespace Flowframes.Main if (canceled) return; Program.mainForm.SetStatus("Running AI..."); await RunAi(current.interpFolder, current.ai, true); - await FrameRename.Unrename(); // Get timestamps back + await Task.Run(async () => { await FrameRename.Unrename(); }); // Get timestamps back Program.mainForm.SetProgress(0); }