diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-07-18 17:11:30 +0000 |
---|---|---|
committer | AUTOMATIC1111 <16777216c@gmail.com> | 2023-07-18 17:11:30 +0000 |
commit | 136c8859a49a35cbffe269aafc0bbdfca0b3561d (patch) | |
tree | 14371834a27a24050555f632fe80d69d16bccdb4 /extensions-builtin/Lora/networks.py | |
parent | eb7c9b58fc2fbab205d4bc9f708800870dcda3fb (diff) | |
download | stable-diffusion-webui-gfx803-136c8859a49a35cbffe269aafc0bbdfca0b3561d.tar.gz stable-diffusion-webui-gfx803-136c8859a49a35cbffe269aafc0bbdfca0b3561d.tar.bz2 stable-diffusion-webui-gfx803-136c8859a49a35cbffe269aafc0bbdfca0b3561d.zip |
add backwards compatibility --lyco-dir-backcompat option, use that for LyCORIS directory instead of hardcoded value
prevent running preload.py for disabled extensions
Diffstat (limited to 'extensions-builtin/Lora/networks.py')
-rw-r--r-- | extensions-builtin/Lora/networks.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/extensions-builtin/Lora/networks.py b/extensions-builtin/Lora/networks.py index 7b4c0312..af8188e3 100644 --- a/extensions-builtin/Lora/networks.py +++ b/extensions-builtin/Lora/networks.py @@ -11,7 +11,7 @@ import network_full import torch
from typing import Union
-from modules import shared, devices, sd_models, errors, scripts, sd_hijack, paths
+from modules import shared, devices, sd_models, errors, scripts, sd_hijack
module_types = [
network_lora.ModuleTypeLora(),
@@ -399,7 +399,7 @@ def list_available_networks(): os.makedirs(shared.cmd_opts.lora_dir, exist_ok=True)
candidates = list(shared.walk_files(shared.cmd_opts.lora_dir, allowed_extensions=[".pt", ".ckpt", ".safetensors"]))
- candidates += list(shared.walk_files(os.path.join(paths.models_path, "LyCORIS"), allowed_extensions=[".pt", ".ckpt", ".safetensors"]))
+ candidates += list(shared.walk_files(shared.cmd_opts.lyco_dir_backcompat, allowed_extensions=[".pt", ".ckpt", ".safetensors"]))
for filename in candidates:
if os.path.isdir(filename):
continue
|