Skip to content

Commit

Permalink
dummy skcpps format
Browse files Browse the repository at this point in the history
  • Loading branch information
LostRuins committed Jul 17, 2024
1 parent eca7521 commit 6c883a4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions koboldcpp.py
Original file line number Diff line number Diff line change
Expand Up @@ -1886,7 +1886,7 @@ def show_gui():
args.model_param = askopenfilename(title="Select ggml model .bin or .gguf file or .kcpps config")
root.withdraw()
root.quit()
if args.model_param and args.model_param!="" and args.model_param.lower().endswith('.kcpps'):
if args.model_param and args.model_param!="" and (args.model_param.lower().endswith('.kcpps') or args.model_param.lower().endswith('.skcpps')):
loadconfigfile(args.model_param)
if not args.model_param and not args.sdmodel and not args.whispermodel:
global exitcounter
Expand Down Expand Up @@ -2284,7 +2284,7 @@ def auto_gpu_heuristics():
return

def on_picked_model_file(filepath):
if filepath.lower().endswith('.kcpps'):
if filepath.lower().endswith('.kcpps') or filepath.lower().endswith('.skcpps'):
#load it as a config file instead
with open(filepath, 'r') as f:
dict = json.load(f)
Expand Down Expand Up @@ -2968,7 +2968,7 @@ def import_vars(dict):
whisper_model_var.set(dict["whispermodel"] if ("whispermodel" in dict and dict["whispermodel"]) else "")

def save_config():
file_type = [("KoboldCpp Settings", "*.kcpps")]
file_type = [("KoboldCpp Settings", "*.kcpps *.skcpps")]
filename = asksaveasfile(filetypes=file_type, defaultextension=file_type)
if filename == None: return
export_vars()
Expand All @@ -2978,7 +2978,7 @@ def save_config():
pass

def load_config():
file_type = [("KoboldCpp Settings", "*.kcpps")]
file_type = [("KoboldCpp Settings", "*.kcpps *.skcpps")]
global runmode_untouched
runmode_untouched = False
filename = askopenfilename(filetypes=file_type, defaultextension=file_type, initialdir=None)
Expand Down Expand Up @@ -3494,7 +3494,7 @@ def main(launch_args,start_server=True):
args = convert_outdated_args(args)

#positional handling for kcpps files (drag and drop)
if args.model_param and args.model_param!="" and args.model_param.lower().endswith('.kcpps'):
if args.model_param and args.model_param!="" and (args.model_param.lower().endswith('.kcpps') or args.model_param.lower().endswith('.skcpps')):
loadconfigfile(args.model_param)

#prevent quantkv from being used without flash attn
Expand Down

0 comments on commit 6c883a4

Please sign in to comment.