Skip to content

Commit

Permalink
handle urls as config download in model param
Browse files Browse the repository at this point in the history
  • Loading branch information
LostRuins committed Dec 20, 2024
1 parent 50648de commit fc52a38
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions koboldcpp.py
Original file line number Diff line number Diff line change
Expand Up @@ -2584,6 +2584,9 @@ def show_gui():
root.withdraw()
root.quit()
if args.model_param and args.model_param!="" and (args.model_param.lower().endswith('.kcpps') or args.model_param.lower().endswith('.kcppt')):
dlfile = download_model_from_url(args.model_param,[".kcpps",".kcppt"]) # maybe download from url
if dlfile:
args.model_param = dlfile
load_config_cli(args.model_param)
if not args.model_param and not args.sdmodel and not args.whispermodel and not args.nomodel:
global exitcounter
Expand Down Expand Up @@ -4353,6 +4356,9 @@ def main(launch_args,start_server=True):

#positional handling for kcpps files (drag and drop)
if args.model_param and args.model_param!="" and (args.model_param.lower().endswith('.kcpps') or args.model_param.lower().endswith('.kcppt')):
dlfile = download_model_from_url(args.model_param,[".kcpps",".kcppt"]) # maybe download from url
if dlfile:
args.model_param = dlfile
load_config_cli(args.model_param)

#prevent quantkv from being used without flash attn
Expand Down

0 comments on commit fc52a38

Please sign in to comment.