Commit f3965cce authored by Connum's avatar Connum Committed by AUTOMATIC1111

added command line argument --autolaunch to open the webui URL in the system's...

added command line argument --autolaunch to open the webui URL in the system's default browser upon launch (implements #274)
parent 8e3caace
......@@ -49,6 +49,7 @@ parser.add_argument("--gradio-debug", action='store_true', help="launch gradio
parser.add_argument("--gradio-auth", type=str, help='set gradio authentication like "username:password"; or comma-delimit multiple like "u1:p1,u2:p2,u3:p3"', default=None)
parser.add_argument("--opt-channelslast", action='store_true', help="change memory type for stable diffusion to channels last")
parser.add_argument("--styles-file", type=str, help="filename to use for styles", default=os.path.join(script_path, 'styles.csv'))
parser.add_argument("--autolaunch", action=argparse.BooleanOptionalAction, help="open the webui URL in the system's default browser upon launch", default=False)
cmd_opts = parser.parse_args()
if cmd_opts.opt_split_attention:
......
......@@ -89,6 +89,7 @@ def webui():
server_port=cmd_opts.port,
debug=cmd_opts.gradio_debug,
auth=[tuple(cred.split(':')) for cred in cmd_opts.gradio_auth.strip('"').split(',')] if cmd_opts.gradio_auth else None,
inbrowser=cmd_opts.autolaunch,
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment