mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2024-06-07 21:20:49 +00:00
Merge branch 'master' into master
This commit is contained in:
commit
fc49844aa8
@ -43,7 +43,7 @@ parser.add_argument("--ui-config-file", type=str, help="filename to use for ui c
|
|||||||
parser.add_argument("--hide-ui-dir-config", action='store_true', help="hide directory configuration from webui", default=False)
|
parser.add_argument("--hide-ui-dir-config", action='store_true', help="hide directory configuration from webui", default=False)
|
||||||
parser.add_argument("--ui-settings-file", type=str, help="filename to use for ui settings", default=os.path.join(script_path, 'config.json'))
|
parser.add_argument("--ui-settings-file", type=str, help="filename to use for ui settings", default=os.path.join(script_path, 'config.json'))
|
||||||
parser.add_argument("--gradio-debug", action='store_true', help="launch gradio with --debug option")
|
parser.add_argument("--gradio-debug", action='store_true', help="launch gradio with --debug option")
|
||||||
parser.add_argument("--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("--gradio-auth", type=str, help='set gradio authentication like "username:password"; or comma-delimit multiple like "u1:p1,u2:p2,u3:p3"', default=None)
|
||||||
|
|
||||||
cmd_opts = parser.parse_args()
|
cmd_opts = parser.parse_args()
|
||||||
|
|
||||||
|
9
webui.py
9
webui.py
@ -115,8 +115,13 @@ def webui():
|
|||||||
run_pnginfo=modules.extras.run_pnginfo
|
run_pnginfo=modules.extras.run_pnginfo
|
||||||
)
|
)
|
||||||
|
|
||||||
auth = [tuple(cred.split(':')) for cred in cmd_opts.auth.strip('"').split(',')] if cmd_opts.auth else None
|
demo.launch(
|
||||||
demo.launch(share=cmd_opts.share, server_name="0.0.0.0" if cmd_opts.listen else None, server_port=cmd_opts.port, debug=cmd_opts.gradio_debug, auth=auth)
|
share=cmd_opts.share,
|
||||||
|
server_name="0.0.0.0" if cmd_opts.listen else None,
|
||||||
|
server_port=cmd_opts.port,
|
||||||
|
debug=cmd_opts.gradio_debug,
|
||||||
|
auth=[tuple(cred.split(':')) for cred in cmd_opts.auth.strip('"').split(',')] if cmd_opts.auth else None,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
Loading…
Reference in New Issue
Block a user