sleep longer before exit
This commit is contained in:
parent
19cf2a8663
commit
90058d96b0
1 changed files with 16 additions and 16 deletions
32
koboldcpp.py
32
koboldcpp.py
|
@ -673,7 +673,7 @@ def show_new_gui():
|
|||
root.destroy()
|
||||
if not args.model_param:
|
||||
print("\nNo ggml model file was selected. Exiting.")
|
||||
time.sleep(2)
|
||||
time.sleep(3)
|
||||
sys.exit(2)
|
||||
return
|
||||
|
||||
|
@ -1252,7 +1252,7 @@ def show_new_gui():
|
|||
|
||||
if nextstate==0:
|
||||
print("Exiting by user request.")
|
||||
time.sleep(2)
|
||||
time.sleep(3)
|
||||
sys.exit()
|
||||
elif nextstate==2:
|
||||
time.sleep(0.1)
|
||||
|
@ -1263,7 +1263,7 @@ def show_new_gui():
|
|||
|
||||
if not args.model_param:
|
||||
print("\nNo ggml model file was selected. Exiting.")
|
||||
time.sleep(2)
|
||||
time.sleep(3)
|
||||
sys.exit(2)
|
||||
|
||||
def show_gui_warning(issue=None):
|
||||
|
@ -1275,7 +1275,7 @@ def show_gui_warning(issue=None):
|
|||
messagebox.showerror(title="No Backends Available!", message="KoboldCPP couldn't locate any backends to use.\n\nTo use the program, please run the 'make' command from the directory.")
|
||||
root.destroy()
|
||||
print("No Backend Available (i.e Default, OpenBLAS, CLBlast, CuBLAS). To use the program, please run the 'make' command from the directory.")
|
||||
time.sleep(2)
|
||||
time.sleep(3)
|
||||
sys.exit(2)
|
||||
else:
|
||||
messagebox.showerror(title="New GUI failed, using Old GUI", message="The new GUI failed to load.\n\nTo use new GUI, please install the customtkinter python module.")
|
||||
|
@ -1369,7 +1369,7 @@ def show_old_gui():
|
|||
|
||||
if launchclicked==False:
|
||||
print("Exiting by user request.")
|
||||
time.sleep(2)
|
||||
time.sleep(3)
|
||||
sys.exit()
|
||||
|
||||
#load all the vars
|
||||
|
@ -1425,7 +1425,7 @@ def show_old_gui():
|
|||
root.destroy()
|
||||
if not args.model_param:
|
||||
print("\nNo ggml model file was selected. Exiting.")
|
||||
time.sleep(2)
|
||||
time.sleep(3)
|
||||
sys.exit(2)
|
||||
|
||||
else:
|
||||
|
@ -1435,7 +1435,7 @@ def show_old_gui():
|
|||
root.destroy()
|
||||
if not args.model_param:
|
||||
print("\nNo ggml model file was selected. Exiting.")
|
||||
time.sleep(2)
|
||||
time.sleep(3)
|
||||
sys.exit(2)
|
||||
|
||||
#A very simple and stripped down embedded horde worker with no dependencies
|
||||
|
@ -1480,7 +1480,7 @@ def run_horde_worker(args, api_key, worker_name):
|
|||
BRIDGE_AGENT = f"KoboldCppEmbedWorker:1:https://github.com/LostRuins/koboldcpp"
|
||||
cluster = "https://horde.koboldai.net"
|
||||
while exitcounter < 10:
|
||||
time.sleep(2)
|
||||
time.sleep(3)
|
||||
readygo = make_url_request(f'{epurl}/api/v1/info/version', None,'GET')
|
||||
if readygo:
|
||||
print("Embedded Horde Worker is started.")
|
||||
|
@ -1556,10 +1556,10 @@ def run_horde_worker(args, api_key, worker_name):
|
|||
time.sleep(1)
|
||||
if exitcounter<100:
|
||||
print("Horde Worker Shutdown - Too many errors.")
|
||||
time.sleep(2)
|
||||
time.sleep(3)
|
||||
else:
|
||||
print("Horde Worker Shutdown - Server Closing.")
|
||||
time.sleep(1)
|
||||
time.sleep(2)
|
||||
sys.exit(2)
|
||||
|
||||
def main(args):
|
||||
|
@ -1583,7 +1583,7 @@ def main(args):
|
|||
except Exception as ex2:
|
||||
print("File selection GUI unsupported. Please check command line: script.py --help")
|
||||
print("Reason for no GUI: " + str(ex2))
|
||||
time.sleep(2)
|
||||
time.sleep(3)
|
||||
sys.exit(2)
|
||||
|
||||
if args.hordeconfig and args.hordeconfig[0]!="":
|
||||
|
@ -1627,20 +1627,20 @@ def main(args):
|
|||
time.sleep(1)
|
||||
if not os.path.exists(args.model_param):
|
||||
print(f"Cannot find model file: {args.model_param}")
|
||||
time.sleep(2)
|
||||
time.sleep(3)
|
||||
sys.exit(2)
|
||||
|
||||
if args.lora and args.lora[0]!="":
|
||||
if not os.path.exists(args.lora[0]):
|
||||
print(f"Cannot find lora file: {args.lora[0]}")
|
||||
time.sleep(2)
|
||||
time.sleep(3)
|
||||
sys.exit(2)
|
||||
else:
|
||||
args.lora[0] = os.path.abspath(args.lora[0])
|
||||
if len(args.lora) > 1:
|
||||
if not os.path.exists(args.lora[1]):
|
||||
print(f"Cannot find lora base: {args.lora[1]}")
|
||||
time.sleep(2)
|
||||
time.sleep(3)
|
||||
sys.exit(2)
|
||||
else:
|
||||
args.lora[1] = os.path.abspath(args.lora[1])
|
||||
|
@ -1661,7 +1661,7 @@ def main(args):
|
|||
|
||||
if not loadok:
|
||||
print("Could not load model: " + modelname)
|
||||
time.sleep(2)
|
||||
time.sleep(3)
|
||||
sys.exit(3)
|
||||
try:
|
||||
basepath = os.path.abspath(os.path.dirname(__file__))
|
||||
|
@ -1689,7 +1689,7 @@ def main(args):
|
|||
|
||||
if args.hordeconfig and len(args.hordeconfig)>4:
|
||||
horde_thread = threading.Thread(target=run_horde_worker,args=(args,args.hordeconfig[3],args.hordeconfig[4]))
|
||||
horde_thread.setDaemon(True)
|
||||
horde_thread.daemon = True
|
||||
horde_thread.start()
|
||||
|
||||
print(f"Please connect to custom endpoint at {epurl}")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue