aboutsummaryrefslogtreecommitdiff
path: root/webui.py
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2023-07-08 14:20:28 +0300
committerGitHub <noreply@github.com>2023-07-08 14:20:28 +0300
commitd78377ea5d38dea8620fba6307dc5a1b41bc7503 (patch)
tree15af914a7967a317abd7d9e0975dc4b2c17376cd /webui.py
parentae74b44c69a40c3b2f2a91f5ee4160e6d8bbd31e (diff)
parentfc049a2fd3fe4a7d5859ae004d81f30e59f42d06 (diff)
Merge pull request #11593 from akx/better-status-reporting-1
Better status reporting, part 1
Diffstat (limited to 'webui.py')
-rw-r--r--webui.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/webui.py b/webui.py
index bad29f28..1b44d4ad 100644
--- a/webui.py
+++ b/webui.py
@@ -18,6 +18,17 @@ from packaging import version
import logging
+# We can't use cmd_opts for this because it will not have been initialized at this point.
+log_level = os.environ.get("SD_WEBUI_LOG_LEVEL")
+if log_level:
+ log_level = getattr(logging, log_level.upper(), None) or logging.INFO
+ logging.basicConfig(
+ level=log_level,
+ format='%(asctime)s %(levelname)s [%(name)s] %(message)s',
+ datefmt='%Y-%m-%d %H:%M:%S',
+ )
+
+logging.getLogger("torch.distributed.nn").setLevel(logging.ERROR) # sshh...
logging.getLogger("xformers").addFilter(lambda record: 'A matching Triton is not available' not in record.getMessage())
from modules import paths, timer, import_hook, errors, devices # noqa: F401