Skip to content

Commit a2b441a

Browse files
committed
Fix GUI backend count label
1 parent 947e75c commit a2b441a

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

koboldcpp.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ def bring_terminal_to_foreground():
393393
modelbusy = threading.Lock()
394394
requestsinqueue = 0
395395
defaultport = 5001
396-
KcppVersion = "1.51.1.yr1-ROCm"
396+
KcppVersion = "1.51.1.yr2-ROCm"
397397
showdebug = True
398398
showsamplerwarning = True
399399
showmaxctxwarning = True
@@ -990,14 +990,14 @@ def show_new_gui():
990990
blasbatchsize_text = ["Don't Batch BLAS","32","64","128","256","512","1024","2048"]
991991
contextsize_text = ["256", "512", "1024", "2048", "3072", "4096", "6144", "8192", "12288", "16384", "24576", "32768", "65536"]
992992
runopts = [opt for lib, opt in lib_option_pairs if file_exists(lib)]
993-
antirunopts = [opt.replace("Use ", "") for lib, opt in lib_option_pairs if not (opt in runopts)]
994-
if os.name != 'nt':
995-
if "NoAVX2 Mode (Old CPU)" in antirunopts:
996-
antirunopts.remove("NoAVX2 Mode (Old CPU)")
997-
if "Failsafe Mode (Old CPU)" in antirunopts:
998-
antirunopts.remove("Failsafe Mode (Old CPU)")
999-
if "CLBlast NoAVX2 (Old CPU)" in antirunopts:
1000-
antirunopts.remove("CLBlast NoAVX2 (Old CPU)")
993+
antirunopts = [opt.replace("Use ", "") for lib, opt in lib_option_pairs if not (opt in runopts) and not (opt == "Use CuBLAS" and "Use hipBLAS (ROCm)" in runopts)]
994+
# if os.name != 'nt':
995+
# if "NoAVX2 Mode (Old CPU)" in antirunopts:
996+
# antirunopts.remove("NoAVX2 Mode (Old CPU)")
997+
# if "Failsafe Mode (Old CPU)" in antirunopts:
998+
# antirunopts.remove("Failsafe Mode (Old CPU)")
999+
# if "CLBlast NoAVX2 (Old CPU)" in antirunopts:
1000+
# antirunopts.remove("CLBlast NoAVX2 (Old CPU)")
10011001
if not any(runopts):
10021002
exitcounter = 999
10031003
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.")
@@ -1366,12 +1366,12 @@ def hide_tooltip(event):
13661366
tooltip.withdraw()
13671367

13681368
def setup_backend_tooltip(parent):
1369-
num_backends_built = makelabel(parent, str(len(runopts)) + f"/{7 if os.name == 'nt' else 4}", 5, 2)
1369+
num_backends_built = makelabel(parent, str(len(runopts)) + f"/{7 if os.name == 'nt' else 7}", 5, 2)
13701370
num_backends_built.grid(row=1, column=1, padx=195, pady=0)
13711371
num_backends_built.configure(text_color="#00ff00")
13721372
# Bind the backend count label with the tooltip function
13731373
nl = '\n'
1374-
num_backends_built.bind("<Enter>", lambda event: show_tooltip(event, f"Number of backends you have built and available." + (f"\n\nMissing Backends: \n\n{nl.join(antirunopts)}" if len(runopts) != 6 else "")))
1374+
num_backends_built.bind("<Enter>", lambda event: show_tooltip(event, f"Number of backends you have built and available." + (f"\n\nMissing Backends: \n\n{nl.join(antirunopts)}" if len(runopts) != 7 else "")))
13751375
num_backends_built.bind("<Leave>", hide_tooltip)
13761376

13771377
# # Vars - should be in scope to be used by multiple widgets

0 commit comments

Comments
 (0)