static void Main() { Config.Init(); if (Config.GetBool(Config.Key.delLogsOnStartup)) { IoUtils.DeleteContentsOfDir(Paths.GetLogPath()); // Clear out older logs from previous session } ServicePointManager.Expect100Continue = true; ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls; Task.Run(() => DiskSpaceCheckLoop()); fileArgs = Environment.GetCommandLineArgs().Where(a => a[0] != '-' && File.Exists(a)).ToList().Skip(1).ToArray(); args = Environment.GetCommandLineArgs().Where(a => a[0] == '-').Select(x => x.Trim().Substring(1).ToLowerInvariant()).ToArray(); Logger.Log($"Command Line: {Environment.CommandLine}", true); Logger.Log($"Files: {(fileArgs.Length > 0 ? string.Join(", ", fileArgs) : "None")}", true); Logger.Log($"Args: {(args.Length > 0 ? string.Join(", ", args) : "None")}", true); LaunchMainForm(); }
public static async Task RunRifeCuda(string framesPath, float interpFactor, string mdl) { if (Interpolate.currentlyUsingAutoEnc) // Ensure AutoEnc is not paused { AutoEncode.paused = false; } try { string rifeDir = Path.Combine(Paths.GetPkgPath(), Implementations.rifeCuda.pkgDir); string script = "rife.py"; if (!File.Exists(Path.Combine(rifeDir, script))) { Interpolate.Cancel("RIFE script not found! Make sure you didn't modify any files."); return; } string archFilesDir = Path.Combine(rifeDir, "arch"); string archFilesDirModel = Path.Combine(rifeDir, mdl, "arch"); if (Directory.Exists(archFilesDirModel)) { Logger.Log($"Model {mdl} has architecture python files - copying to arch.", true); IoUtils.DeleteContentsOfDir(archFilesDir); IoUtils.CopyDir(archFilesDirModel, archFilesDir); } await RunRifeCudaProcess(framesPath, Paths.interpDir, script, interpFactor, mdl); } catch (Exception e) { Logger.Log("Error running RIFE-CUDA: " + e.Message); Logger.Log("Stack Trace: " + e.StackTrace, true); } await AiFinished("RIFE"); }