From 5a79dd57b99cb1fc03d5e69dc7e1cccaace8363a Mon Sep 17 00:00:00 2001 From: Concedo <39025047+LostRuins@users.noreply.github.com> Date: Sun, 16 Feb 2025 12:45:14 +0800 Subject: [PATCH] add short delay before launching browser --- koboldcpp.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/koboldcpp.py b/koboldcpp.py index 9f0d36fb6..de9eaca6a 100644 --- a/koboldcpp.py +++ b/koboldcpp.py @@ -5590,7 +5590,10 @@ def kcpp_main_process(launch_args, g_memory=None, gui_launcher=False): print(f"StableUI is available at {endpoint_url}/sdui/") global_memory["load_complete"] = True if args.launch: - LaunchWebbrowser(endpoint_url,"--launch was set, but could not launch web browser automatically.") + def launch_browser_thread(): + LaunchWebbrowser(endpoint_url,"--launch was set, but could not launch web browser automatically.") + browser_thread = threading.Timer(2, launch_browser_thread) #2 second delay + browser_thread.start() if args.hordekey and args.hordekey!="": if args.hordeworkername and args.hordeworkername!="":