diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-07-17 17:10:24 +0000 |
---|---|---|
committer | AUTOMATIC1111 <16777216c@gmail.com> | 2023-07-17 17:10:24 +0000 |
commit | a99d5708e6d603e8f7cfd1b8c6595f8026219ba0 (patch) | |
tree | d1dc22f1cf5d7487a632de191b5182c1254ad9bf /webui.py | |
parent | 699108bfbb05c2a7d2ee4a2c7abcfaa0a244d8ea (diff) | |
download | stable-diffusion-webui-gfx803-a99d5708e6d603e8f7cfd1b8c6595f8026219ba0.tar.gz stable-diffusion-webui-gfx803-a99d5708e6d603e8f7cfd1b8c6595f8026219ba0.tar.bz2 stable-diffusion-webui-gfx803-a99d5708e6d603e8f7cfd1b8c6595f8026219ba0.zip |
skip installing packages with pip if theyare already installed
record time it took to launch
Diffstat (limited to 'webui.py')
-rw-r--r-- | webui.py | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -31,21 +31,22 @@ if log_level: 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
-
+from modules import timer
startup_timer = timer.startup_timer
+startup_timer.record("launcher")
import torch
import pytorch_lightning # noqa: F401 # 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")
warnings.filterwarnings(action="ignore", category=UserWarning, module="torchvision")
-
-
startup_timer.record("import torch")
import gradio # noqa: F401
startup_timer.record("import gradio")
+from modules import paths, timer, import_hook, errors, devices # noqa: F401
+startup_timer.record("setup paths")
+
import ldm.modules.encoders.modules # noqa: F401
startup_timer.record("import ldm")
|