diff options
author | Vladimir Mandic <mandic00@live.com> | 2023-02-19 14:19:25 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-19 14:19:25 +0000 |
commit | 8affa42588e85d10da86c401e3558143b05121af (patch) | |
tree | e6b9640f52787f41ba675ec0fb98e580dbad1d85 /webui.py | |
parent | a320d157ec0221fa4e9c756327e31d881b9921ae (diff) | |
parent | 076d624a297532d6e4abebe5807fd7c7504d7a73 (diff) | |
download | stable-diffusion-webui-gfx803-8affa42588e85d10da86c401e3558143b05121af.tar.gz stable-diffusion-webui-gfx803-8affa42588e85d10da86c401e3558143b05121af.tar.bz2 stable-diffusion-webui-gfx803-8affa42588e85d10da86c401e3558143b05121af.zip |
Merge branch 'AUTOMATIC1111:master' into hide_ui_tabs
Diffstat (limited to 'webui.py')
-rw-r--r-- | webui.py | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -20,6 +20,7 @@ import torch # Truncate version number of nightly/local build of PyTorch to not cause exceptions with CodeFormer or Safetensors
if ".dev" in torch.__version__ or "+git" in torch.__version__:
+ torch.__long_version__ = torch.__version__
torch.__version__ = re.search(r'[\d.]+[\d]', torch.__version__).group(0)
from modules import shared, devices, sd_samplers, upscaler, extensions, localization, ui_tempdir, ui_extra_networks
@@ -97,7 +98,6 @@ def initialize(): modules.sd_models.setup_model()
codeformer.setup_model(cmd_opts.codeformer_models_path)
gfpgan.setup_model(cmd_opts.gfpgan_models_path)
- shared.face_restorers.append(modules.face_restoration.FaceRestoration())
modelloader.list_builtin_upscalers()
modules.scripts.load_scripts()
@@ -207,6 +207,14 @@ def webui(): if cmd_opts.gradio_queue:
shared.demo.queue(64)
+ gradio_auth_creds = []
+ if cmd_opts.gradio_auth:
+ gradio_auth_creds += cmd_opts.gradio_auth.strip('"').replace('\n', '').split(',')
+ if cmd_opts.gradio_auth_path:
+ with open(cmd_opts.gradio_auth_path, 'r', encoding="utf8") as file:
+ for line in file.readlines():
+ gradio_auth_creds += [x.strip() for x in line.split(',')]
+
app, local_url, share_url = shared.demo.launch(
share=cmd_opts.share,
server_name=server_name,
@@ -214,7 +222,7 @@ def webui(): ssl_keyfile=cmd_opts.tls_keyfile,
ssl_certfile=cmd_opts.tls_certfile,
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,
+ auth=[tuple(cred.split(':')) for cred in gradio_auth_creds] if gradio_auth_creds else None,
inbrowser=cmd_opts.autolaunch,
prevent_thread_lock=True
)
|