From f27972777f5f81a5c75068fbbeff8e637ec21555 Mon Sep 17 00:00:00 2001 From: YellowRoseCx <80486540+YellowRoseCx@users.noreply.github.com> Date: Mon, 31 Jul 2023 02:51:35 -0500 Subject: [PATCH] correct semantic error in import_vars (#355) * Hide unavailable backends & Add tooltip over backend count Hides unavailable backends from the user and if the program is launched without any backends made, it shows an error message to them stating no backends were found and to make them using the 'make' command Add tooltip when hovering over backend count label hovering over the new label that shows the backend count will explain what the numbers are, and show the users which backends are not available or built * add some code comments * hide "missing" if all are built move tooltip functions to helper functions section. hides the string "Missing: ..." from showing if all backends are available " if len(runopts)==6 else + " * small typo fix * remove wrongly added leftover device choosing code * fix labels * move tooltip to function * import vars logic fix --------- Co-authored-by: Concedo <39025047+LostRuins@users.noreply.github.com> --- koboldcpp.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/koboldcpp.py b/koboldcpp.py index d76a8c282e22d..e9d5cd4ce647e 100755 --- a/koboldcpp.py +++ b/koboldcpp.py @@ -1137,10 +1137,7 @@ def import_vars(dict): if str(g) in dict["usecublas"]: gpu_choice_var.set(str(g+1)) break - if "gpulayers" in dict and dict["gpulayers"]: - gpulayers_var.set(dict["gpulayers"]) - - if "noavx2" in dict and "noblas" in dict and dict["noblas"] and dict["noavx2"]: + elif "noavx2" in dict and "noblas" in dict and dict["noblas"] and dict["noavx2"]: if failsafe_option is not None: runopts_var.set(failsafe_option) elif "noavx2" in dict and dict["noavx2"]: @@ -1151,6 +1148,8 @@ def import_vars(dict): runopts_var.set(default_option) elif openblas_option is not None: runopts_var.set(openblas_option) + if "gpulayers" in dict and dict["gpulayers"]: + gpulayers_var.set(dict["gpulayers"]) if "blasthreads" in dict and dict["blasthreads"]: blas_threads_var.set(str(dict["blasthreads"])) else: