From 61a65d592fe6647782130a0bbb2f63245684cb98 Mon Sep 17 00:00:00 2001 From: N00MKRAD <61149547+n00mkrad@users.noreply.github.com> Date: Fri, 6 Sep 2024 16:11:49 +0200 Subject: [PATCH] Disable pytorch implems by default, enable explicitly with -py/--enable_python flag --- CodeLegacy/Cli.cs | 6 +++++- CodeLegacy/Os/Python.cs | 2 -- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CodeLegacy/Cli.cs b/CodeLegacy/Cli.cs index fbd91d1..9c0c1ee 100644 --- a/CodeLegacy/Cli.cs +++ b/CodeLegacy/Cli.cs @@ -15,7 +15,7 @@ namespace Flowframes public class Cli { public static bool ShowConsole = false; - public static bool DisablePython = false; + public static bool DisablePython = true; public static bool ShowMdlDownloader = false; public static bool DontSaveConfig = false; public static bool AutoRun = false; @@ -50,6 +50,10 @@ namespace Flowframes "np|no_python", "Disable Python implementations", v => DisablePython = v != null }, + { + "py|enable_python", "Enable Python implementations", + v => DisablePython = !(v != null) + }, { "md|open_model_downloader", "Open model downloader GUI on startup", v => ShowMdlDownloader = v != null diff --git a/CodeLegacy/Os/Python.cs b/CodeLegacy/Os/Python.cs index 30430c8..0f1df4b 100644 --- a/CodeLegacy/Os/Python.cs +++ b/CodeLegacy/Os/Python.cs @@ -144,8 +144,6 @@ namespace Flowframes.Os py.Start(); py.WaitForExit(); string output = py.StandardOutput.ReadToEnd(); - string err = py.StandardError.ReadToEnd(); - if (!string.IsNullOrWhiteSpace(err)) output += "\n" + err; Logger.Log("[DepCheck] Pytorch Check Output: " + output.Trim(), true); return output; }