diff --git a/Code/IO/PkgInstaller.cs b/Code/IO/PkgInstaller.cs index d348939..cd528b8 100644 --- a/Code/IO/PkgInstaller.cs +++ b/Code/IO/PkgInstaller.cs @@ -36,15 +36,16 @@ namespace Flowframes.IO public static async Task DownloadAndInstall(string filename, bool showDialog = true) { string savePath = Path.Combine(Paths.GetPkgPath(), filename); - string url = $"https://dl.nmkd.de/flowframes/pkgs/{filename}"; + string url = $"http://dl.nmkd.de/flowframes/pkgs/{filename}"; Logger.Log($"[PkgInstaller] Downloading {url}", true); var client = new WebClient(); - //client.Proxy = WebRequest.DefaultWebProxy; + client.Proxy = WebRequest.DefaultWebProxy; + Print($"Downloading {filename}..."); sw.Restart(); client.DownloadProgressChanged += (sender, args) => { - if (sw.ElapsedMilliseconds > 200) + if (sw.ElapsedMilliseconds > 250) { sw.Restart(); Print($"Downloading {filename}... {args.ProgressPercentage}%", true); @@ -52,9 +53,13 @@ namespace Flowframes.IO }; client.DownloadFileCompleted += (sender, args) => { + if (args.Error != null) + Print("Download failed: " + args.Error.Message); Print($"Downloading {filename}... 100%", true); }; + await client.DownloadFileTaskAsync(new Uri(url), savePath); + try { if (Path.GetExtension(filename).ToLower() == ".7z") // Only run extractor if it's a 7z archive diff --git a/Code/Main/Interpolate.cs b/Code/Main/Interpolate.cs index de24bbb..1d8676f 100644 --- a/Code/Main/Interpolate.cs +++ b/Code/Main/Interpolate.cs @@ -144,7 +144,7 @@ namespace Flowframes public static async Task PostProcessFrames (bool sbsMode = false) { bool firstFrameFix = (!sbsMode && lastAi.aiName == Networks.rifeCuda.aiName) || (sbsMode && InterpolateSteps.currentAi.aiName == Networks.rifeCuda.aiName); - //firstFrameFix = false; // TODO: Remove firstframefix if new rife code works + firstFrameFix = false; // TODO: Remove firstframefix if new rife code works if (!Directory.Exists(currentFramesPath) || IOUtils.GetAmountOfFiles(currentFramesPath, false, "*.png") <= 0) { @@ -185,7 +185,7 @@ namespace Flowframes { currentlyUsingAutoEnc = IOUtils.GetAmountOfFiles(currentFramesPath, false) * lastInterpFactor >= (AutoEncode.chunkSize + AutoEncode.safetyBufferFrames) * 1.2f; //Logger.Log("Using autoenc if there's more than " + (AutoEncode.chunkSize + AutoEncode.safetyBufferFrames) * 1.2f + " input frames, got " + IOUtils.GetAmountOfFiles(currentFramesPath, false) * lastInterpFactor); - currentlyUsingAutoEnc = false; + //currentlyUsingAutoEnc = false; Directory.CreateDirectory(outpath); @@ -241,7 +241,7 @@ namespace Flowframes canceled = true; Program.mainForm.SetStatus("Canceled."); Program.mainForm.SetProgress(0); - if (Config.GetInt("processingMode") == 1 && !Config.GetBool("keepTempFolder")) + if (Config.GetInt("processingMode") == 0 && !Config.GetBool("keepTempFolder")) IOUtils.TryDeleteIfExists(currentTempDir); Program.mainForm.SetWorking(false); Program.mainForm.SetTab("interpolation"); diff --git a/Code/OS/Pytorch.cs b/Code/OS/Pytorch.cs index 135be28..8c565ce 100644 --- a/Code/OS/Pytorch.cs +++ b/Code/OS/Pytorch.cs @@ -76,7 +76,10 @@ namespace Flowframes.OS string sysPyVer = GetSysPyVersion(); if (!string.IsNullOrWhiteSpace(sysPyVer) && !sysPyVer.ToLower().Contains("not found") && sysPyVer.Length <= 35) + { isInstalled = true; + Logger.Log("Using Python installation: " + sysPyVer, false, true); + } hasCheckedSysPy = true; sysPyInstalled = isInstalled;