diff options
author | AUTOMATIC <16777216c@gmail.com> | 2023-05-21 18:55:14 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2023-05-21 18:55:14 +0000 |
commit | 8faac8b96313c6c4bf0a81bddecff4d6ba22ac25 (patch) | |
tree | e6c85dd596aa9495d51b8af5eef756408cf6ada2 /webui.py | |
parent | 1f3182924ba8e70d0e0fc3ed270782f324376ba3 (diff) | |
download | stable-diffusion-webui-gfx803-8faac8b96313c6c4bf0a81bddecff4d6ba22ac25.tar.gz stable-diffusion-webui-gfx803-8faac8b96313c6c4bf0a81bddecff4d6ba22ac25.tar.bz2 stable-diffusion-webui-gfx803-8faac8b96313c6c4bf0a81bddecff4d6ba22ac25.zip |
run basic torch calculation at startup in parallel to reduce the performance impact of first generation
Diffstat (limited to 'webui.py')
-rw-r--r-- | webui.py | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -20,7 +20,7 @@ import logging logging.getLogger("xformers").addFilter(lambda record: 'A matching Triton is not available' not in record.getMessage())
-from modules import paths, timer, import_hook, errors # noqa: F401
+from modules import paths, timer, import_hook, errors, devices # noqa: F401
startup_timer = timer.Timer()
@@ -295,6 +295,8 @@ def initialize_rest(*, reload_script_modules=False): # (when reloading, this does nothing)
Thread(target=lambda: shared.sd_model).start()
+ Thread(target=devices.first_time_calculation).start()
+
shared.reload_hypernetworks()
startup_timer.record("reload hypernetworks")
|