diff options
author | InvincibleDude <81354513+InvincibleDude@users.noreply.github.com> | 2023-03-03 16:49:24 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-03 16:49:24 +0000 |
commit | e97b83bdbb852fd2c06ed2ec6c0f92d458e82245 (patch) | |
tree | 0f0b3779120d602d1d833a50e33c9f73b218f684 /webui.py | |
parent | 51f81efb02876d24c9e6d844e8c0cbd2384f6514 (diff) | |
parent | 0cc0ee1bcb4c24a8c9715f66cede06601bfc00c8 (diff) | |
download | stable-diffusion-webui-gfx803-e97b83bdbb852fd2c06ed2ec6c0f92d458e82245.tar.gz stable-diffusion-webui-gfx803-e97b83bdbb852fd2c06ed2ec6c0f92d458e82245.tar.bz2 stable-diffusion-webui-gfx803-e97b83bdbb852fd2c06ed2ec6c0f92d458e82245.zip |
Merge branch 'master' into improved-hr-conflict-test
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
)
|