diff --git a/Code/Data/AI.cs b/Code/Data/AI.cs index b8be3fc..712da7e 100644 --- a/Code/Data/AI.cs +++ b/Code/Data/AI.cs @@ -31,6 +31,9 @@ namespace Flowframes.Data PkgDir = pkgDir; SupportedFactors = supportedFactors; FactorSupport = factorSupport; + + if (backend == AiBackend.Pytorch) + Description += " (Nvidia Only!)"; } } } diff --git a/Code/Data/Implementations.cs b/Code/Data/Implementations.cs index 6c8e57f..b4ad9b5 100644 --- a/Code/Data/Implementations.cs +++ b/Code/Data/Implementations.cs @@ -5,7 +5,7 @@ namespace Flowframes.Data class Implementations { public static AI rifeCuda = new AI(AI.AiBackend.Pytorch, "RIFE_CUDA", "RIFE", - "CUDA/Pytorch Implementation of RIFE (Nvidia Only!)", "rife-cuda", AI.InterpFactorSupport.AnyInteger, new int[] { 2, 3, 4, 5, 6, 7, 8, 9, 10 }); + "CUDA/Pytorch Implementation of RIFE", "rife-cuda", AI.InterpFactorSupport.AnyInteger, new int[] { 2, 3, 4, 5, 6, 7, 8, 9, 10 }); public static AI rifeNcnnVs = new AI(AI.AiBackend.Ncnn, "RIFE_NCNN_VS", "RIFE (NCNN/VS)", "Vulkan/NCNN/VapourSynth Implementation of RIFE", "rife-ncnn-vs", AI.InterpFactorSupport.AnyFloat, new int[] { 2, 3, 4, 5, 6, 7, 8, 9, 10 }) { Piped = true }; @@ -14,13 +14,13 @@ namespace Flowframes.Data "Vulkan/NCNN Implementation of RIFE", "rife-ncnn", AI.InterpFactorSupport.AnyFloat, new int[] { 2, 3, 4, 5, 6, 7, 8, 9, 10 }); public static AI flavrCuda = new AI(AI.AiBackend.Pytorch, "FLAVR_CUDA", "FLAVR", - "Experimental Pytorch Implementation of FLAVR (Nvidia Only!)", "flavr-cuda", AI.InterpFactorSupport.Fixed, new int[] { 2, 4, 8 }); + "Experimental Pytorch Implementation of FLAVR", "flavr-cuda", AI.InterpFactorSupport.Fixed, new int[] { 2, 4, 8 }); public static AI dainNcnn = new AI(AI.AiBackend.Ncnn, "DAIN_NCNN", "DAIN (NCNN)", "Vulkan/NCNN Implementation of DAIN", "dain-ncnn", AI.InterpFactorSupport.AnyFloat, new int[] { 2, 3, 4, 5, 6, 7, 8 }); public static AI xvfiCuda = new AI(AI.AiBackend.Pytorch, "XVFI_CUDA", "XVFI", - "CUDA/Pytorch Implementation of XVFI (Nvidia Only!)", "xvfi-cuda", AI.InterpFactorSupport.AnyInteger, new int[] { 2, 3, 4, 5, 6, 7, 8, 9, 10 }); + "CUDA/Pytorch Implementation of XVFI", "xvfi-cuda", AI.InterpFactorSupport.AnyInteger, new int[] { 2, 3, 4, 5, 6, 7, 8, 9, 10 }); public static List networks = new List { rifeCuda, rifeNcnnVs, rifeNcnn, flavrCuda, dainNcnn, xvfiCuda }; diff --git a/Code/Form1.cs b/Code/Form1.cs index ee441eb..6941d68 100644 --- a/Code/Form1.cs +++ b/Code/Form1.cs @@ -270,7 +270,7 @@ namespace Flowframes void InitAis() { - bool pytorchAvailable = Python.HasEmbeddedPyFolder() || Python.IsSysPyInstalled(); + bool pytorchAvailable = Python.IsPytorchReady(); foreach (AI ai in Implementations.networks) { diff --git a/Code/Os/AiProcess.cs b/Code/Os/AiProcess.cs index c277eb6..97585b8 100644 --- a/Code/Os/AiProcess.cs +++ b/Code/Os/AiProcess.cs @@ -566,8 +566,6 @@ namespace Flowframes.Os { hasShownError = true; UiUtils.ShowMessageBox($"A python module is missing.\nCheck {logFilename} for details.\n\n{line}", UiUtils.MessageType.Error); - if (!Python.HasEmbeddedPyFolder()) - Process.Start("https://github.com/n00mkrad/flowframes/blob/main/PythonDependencies.md"); } if (!hasShownError && line.ToLower().Contains("no longer supports this gpu")) diff --git a/Code/Os/Python.cs b/Code/Os/Python.cs index b97046d..d382096 100644 --- a/Code/Os/Python.cs +++ b/Code/Os/Python.cs @@ -105,8 +105,12 @@ namespace Flowframes.Os public static bool IsPytorchReady () { + if (HasEmbeddedPyFolder()) + return true; + string torchVer = GetPytorchVer(); - if (!string.IsNullOrWhiteSpace(torchVer) && torchVer.Length <= 35) + + if (!string.IsNullOrWhiteSpace(torchVer) && torchVer.Length <= 35 && !torchVer.Contains("ModuleNotFoundError")) return true; else return false; @@ -118,13 +122,13 @@ namespace Flowframes.Os { Process py = OsUtils.NewProcess(true); py.StartInfo.Arguments = "\"/C\" " + GetPyCmd() + " -c \"import torch; print(torch.__version__)\""; - Logger.Log("[DepCheck] CMD: " + py.StartInfo.Arguments); + Logger.Log($"[DepCheck] CMD: {py.StartInfo.Arguments}", true); 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()); + Logger.Log("[DepCheck] Pytorch Check Output: " + output.Trim(), true); return output; } catch