From 5e5be717c391c626445b758cce08d867bc61af23 Mon Sep 17 00:00:00 2001 From: Concedo <39025047+LostRuins@users.noreply.github.com> Date: Sun, 5 Nov 2023 10:12:12 +0800 Subject: [PATCH] fix for removing inaccessible backends in gui --- koboldcpp.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/koboldcpp.py b/koboldcpp.py index 4569f51cc..94d93fdbb 100755 --- a/koboldcpp.py +++ b/koboldcpp.py @@ -956,9 +956,12 @@ def show_new_gui(): runopts = [opt for lib, opt in lib_option_pairs if file_exists(lib)] antirunopts = [opt.replace("Use ", "") for lib, opt in lib_option_pairs if not (opt in runopts)] if os.name != 'nt': - antirunopts.remove("NoAVX2 Mode (Old CPU)") - antirunopts.remove("Failsafe Mode (Old CPU)") - antirunopts.remove("CLBlast NoAVX2 (Old CPU)") + if "NoAVX2 Mode (Old CPU)" in antirunopts: + antirunopts.remove("NoAVX2 Mode (Old CPU)") + if "Failsafe Mode (Old CPU)" in antirunopts: + antirunopts.remove("Failsafe Mode (Old CPU)") + if "CLBlast NoAVX2 (Old CPU)" in antirunopts: + antirunopts.remove("CLBlast NoAVX2 (Old CPU)") if not any(runopts): exitcounter = 999 show_gui_msgbox("No Backends Available!","KoboldCPP couldn't locate any backends to use (i.e Default, OpenBLAS, CLBlast, CuBLAS).\n\nTo use the program, please run the 'make' command from the directory.")