remove keys, use tuple

This commit is contained in:
Concedo 2024-07-18 22:11:13 +08:00
parent 7de1ebf897
commit 8b0a9f7e56

View file

@ -2512,16 +2512,16 @@ def show_gui():
# quick boxes
quick_boxes = {
"Launch Browser": {"variable": launchbrowser, "description": "Launches your default browser after model loading is complete"},
"Disable MMAP": {"variable": disablemmap, "description": "Avoids using mmap to load models if enabled"},
"Use ContextShift": {"variable": contextshift, "description": "Uses Context Shifting to reduce reprocessing.\nRecommended. Check the wiki for more info."},
"Remote Tunnel": {"variable": remotetunnel, "description": "Creates a trycloudflare tunnel.\nAllows you to access koboldcpp from other devices over an internet URL."},
"Use FlashAttention": {"variable": flashattention, "description": "Enable flash attention for GGUF models."},
"Quiet Mode": {"variable": quietmode, "description": "Prevents all generation related terminal output from being displayed."}
"Launch Browser": [launchbrowser, "Launches your default browser after model loading is complete"],
"Disable MMAP": [disablemmap, "Avoids using mmap to load models if enabled"],
"Use ContextShift": [contextshift, "Uses Context Shifting to reduce reprocessing.\nRecommended. Check the wiki for more info."],
"Remote Tunnel": [remotetunnel, "Creates a trycloudflare tunnel.\nAllows you to access koboldcpp from other devices over an internet URL."],
"Use FlashAttention": [flashattention, "Enable flash attention for GGUF models."],
"Quiet Mode": [quietmode, "Prevents all generation related terminal output from being displayed."]
}
for idx, (name, properties) in enumerate(quick_boxes.items()):
makecheckbox(quick_tab, name, properties["variable"], int(idx/2) + 20, idx % 2, tooltiptxt=properties["description"])
makecheckbox(quick_tab, name, properties[0], int(idx/2) + 20, idx % 2, tooltiptxt=properties[1])
# context size
makeslider(quick_tab, "Context Size:", contextsize_text, context_var, 0, len(contextsize_text)-1, 30, width=280, set=5,tooltip="What is the maximum context size to support. Model specific. You cannot exceed it.\nLarger contexts require more memory, and not all models support it.")
@ -2559,16 +2559,16 @@ def show_gui():
# hardware checkboxes
hardware_boxes = {
"Launch Browser": {"variable": launchbrowser, "description": "Launches your default browser after model loading is complete"},
"High Priority": {"variable": highpriority, "description": "Increases the koboldcpp process priority.\nMay cause lag or slowdown instead. Not recommended."},
"Disable MMAP": {"variable": disablemmap, "description": "Avoids using mmap to load models if enabled"},
"Use mlock": {"variable": usemlock, "description": "Enables mlock, preventing the RAM used to load the model from being paged out."},
"Debug Mode": {"variable": debugmode, "description": "Enables debug mode, with extra info printed to the terminal."},
"Keep Foreground": {"variable": keepforeground, "description": "Bring KoboldCpp to the foreground every time there is a new generation."}
"Launch Browser": [launchbrowser, "Launches your default browser after model loading is complete"],
"High Priority": [highpriority, "Increases the koboldcpp process priority.\nMay cause lag or slowdown instead. Not recommended."],
"Disable MMAP": [disablemmap, "Avoids using mmap to load models if enabled"],
"Use mlock": [usemlock, "Enables mlock, preventing the RAM used to load the model from being paged out."],
"Debug Mode": [debugmode, "Enables debug mode, with extra info printed to the terminal."],
"Keep Foreground": [keepforeground, "Bring KoboldCpp to the foreground every time there is a new generation."]
}
for idx, (name, properties) in enumerate(hardware_boxes.items()):
makecheckbox(hardware_tab, name, properties["variable"], int(idx/2) + 30, idx % 2, tooltiptxt=properties["description"])
makecheckbox(hardware_tab, name, properties[0], int(idx/2) + 30, idx % 2, tooltiptxt=properties[1])
# blas thread specifier
makelabelentry(hardware_tab, "BLAS threads:" , blas_threads_var, 14, 50,tooltip="How many threads to use during BLAS processing.\nIf left blank, uses same value as regular thread count.")