diff options
author | AUTOMATIC <16777216c@gmail.com> | 2022-10-24 06:39:46 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2022-10-24 06:39:46 +0000 |
commit | 876a96f0f9843382ebc8984db3de5d8af0e9ce4c (patch) | |
tree | 8771f3f3f9918166be53dbe5d5d87c6ad23b409b | |
parent | 999929bea4e66384e6cf8da1e2cf833d1fa41053 (diff) | |
download | stable-diffusion-webui-gfx803-876a96f0f9843382ebc8984db3de5d8af0e9ce4c.tar.gz stable-diffusion-webui-gfx803-876a96f0f9843382ebc8984db3de5d8af0e9ce4c.tar.bz2 stable-diffusion-webui-gfx803-876a96f0f9843382ebc8984db3de5d8af0e9ce4c.zip |
remove erroneous dir in the extension directory
remove loading .js files from scripts dir (they go into javascript)
load scripts after models, for scripts that depend on loaded models
m--------- | extensions/stable-diffusion-webui-inspiration | 0 | ||||
-rw-r--r-- | modules/ui.py | 2 | ||||
-rw-r--r-- | webui.py | 11 |
3 files changed, 7 insertions, 6 deletions
diff --git a/extensions/stable-diffusion-webui-inspiration b/extensions/stable-diffusion-webui-inspiration deleted file mode 160000 -Subproject a0b96664d2524b87916ae463fbb65411b13a569 diff --git a/modules/ui.py b/modules/ui.py index a73b9ff0..03528968 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -1885,7 +1885,7 @@ def load_javascript(raw_response): javascript = f'<script>{jsfile.read()}</script>'
scripts_list = modules.scripts.list_scripts("javascript", ".js")
- scripts_list += modules.scripts.list_scripts("scripts", ".js")
+
for basedir, filename, path in scripts_list:
with open(path, "r", encoding="utf8") as jsfile:
javascript += f"\n<!-- {filename} --><script>{jsfile.read()}</script>"
@@ -9,7 +9,7 @@ from fastapi.middleware.gzip import GZipMiddleware from modules.paths import script_path
-from modules import devices, sd_samplers
+from modules import devices, sd_samplers, upscaler
import modules.codeformer_model as codeformer
import modules.extras
import modules.face_restoration
@@ -73,12 +73,11 @@ def wrap_gradio_gpu_call(func, extra_outputs=None): def initialize():
- modules.scripts.load_scripts()
if cmd_opts.ui_debug_mode:
- class enmpty():
- name = None
- shared.sd_upscalers = [enmpty()]
+ shared.sd_upscalers = upscaler.UpscalerLanczos().scalers
+ modules.scripts.load_scripts()
return
+
modelloader.cleanup_models()
modules.sd_models.setup_model()
codeformer.setup_model(cmd_opts.codeformer_models_path)
@@ -86,6 +85,8 @@ def initialize(): shared.face_restorers.append(modules.face_restoration.FaceRestoration())
modelloader.load_upscalers()
+ modules.scripts.load_scripts()
+
modules.sd_models.load_model()
shared.opts.onchange("sd_model_checkpoint", wrap_queued_call(lambda: modules.sd_models.reload_model_weights(shared.sd_model)))
shared.opts.onchange("sd_hypernetwork", wrap_queued_call(lambda: modules.hypernetworks.hypernetwork.load_hypernetwork(shared.opts.sd_hypernetwork)))
|