aboutsummaryrefslogtreecommitdiff
path: root/webui.py
diff options
context:
space:
mode:
authorpieresimakp <69743585+pieresimakp@users.noreply.github.com>2023-03-25 23:00:45 +0800
committerpieresimakp <69743585+pieresimakp@users.noreply.github.com>2023-03-25 23:00:45 +0800
commite3b9d0e3e8adfb6214a1eb7acf450574f427ff9d (patch)
treec9c64ad1f926df990fb2ce05c6eec063de195eec /webui.py
parent771ea212de13711b494b082d8e94e79b17ac9d08 (diff)
parent91ae48fd7e20c60d6374f340cac0939f56d87048 (diff)
Merge branch 'master' into img2img-detect-image-size
Diffstat (limited to 'webui.py')
-rw-r--r--webui.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/webui.py b/webui.py
index aaec79fd..30f3e4a1 100644
--- a/webui.py
+++ b/webui.py
@@ -4,6 +4,7 @@ import time
import importlib
import signal
import re
+import warnings
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
from fastapi.middleware.gzip import GZipMiddleware
@@ -17,6 +18,8 @@ from modules import paths, timer, import_hook, errors
startup_timer = timer.Timer()
import torch
+import pytorch_lightning # pytorch_lightning should be imported after torch, but it re-enables warnings on import so import once to disable them
+warnings.filterwarnings(action="ignore", category=DeprecationWarning, module="pytorch_lightning")
startup_timer.record("import torch")
import gradio
@@ -240,7 +243,7 @@ def webui():
shared.demo = modules.ui.create_ui()
startup_timer.record("create ui")
- if cmd_opts.gradio_queue:
+ if not cmd_opts.no_gradio_queue:
shared.demo.queue(64)
gradio_auth_creds = []
@@ -262,6 +265,9 @@ def webui():
inbrowser=cmd_opts.autolaunch,
prevent_thread_lock=True
)
+ for dep in shared.demo.dependencies:
+ dep['show_progress'] = False # disable gradio css animation on component update
+
# after initial launch, disable --autolaunch for subsequent restarts
cmd_opts.autolaunch = False