From 84b2125681f988c2468fbad2e59bbade40780dd2 Mon Sep 17 00:00:00 2001 From: N00MKRAD Date: Sat, 10 Apr 2021 00:35:54 +0200 Subject: [PATCH] Fixed CUDA AIs not working without detected GPU (and added cfg option) --- Code/Main/InterpolateUtils.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Code/Main/InterpolateUtils.cs b/Code/Main/InterpolateUtils.cs index 868f354..312d270 100644 --- a/Code/Main/InterpolateUtils.cs +++ b/Code/Main/InterpolateUtils.cs @@ -340,8 +340,12 @@ namespace Flowframes.Main if (I.current.ai.aiName.ToUpper().Contains("CUDA") && NvApi.gpuList.Count < 1) { ShowMessage("Warning: No Nvidia GPU was detected. CUDA might fall back to CPU!\n\nTry an NCNN implementation instead if you don't have an Nvidia GPU.", "Error"); - //I.Cancel("No CUDA-capable graphics card available.", true); - return false; + + if (!Config.GetBool("allowCudaWithoutDetectedGpu", true)) + { + I.Cancel("No CUDA-capable graphics card available.", true); + return false; + } } return true;