diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-07-08 11:20:28 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-08 11:20:28 +0000 |
commit | d78377ea5d38dea8620fba6307dc5a1b41bc7503 (patch) | |
tree | 15af914a7967a317abd7d9e0975dc4b2c17376cd /webui.py | |
parent | ae74b44c69a40c3b2f2a91f5ee4160e6d8bbd31e (diff) | |
parent | fc049a2fd3fe4a7d5859ae004d81f30e59f42d06 (diff) | |
download | stable-diffusion-webui-gfx803-d78377ea5d38dea8620fba6307dc5a1b41bc7503.tar.gz stable-diffusion-webui-gfx803-d78377ea5d38dea8620fba6307dc5a1b41bc7503.tar.bz2 stable-diffusion-webui-gfx803-d78377ea5d38dea8620fba6307dc5a1b41bc7503.zip |
Merge pull request #11593 from akx/better-status-reporting-1
Better status reporting, part 1
Diffstat (limited to 'webui.py')
-rw-r--r-- | webui.py | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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
|