diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-07-17 07:06:02 +0000 |
---|---|---|
committer | AUTOMATIC1111 <16777216c@gmail.com> | 2023-07-17 07:06:02 +0000 |
commit | 35510f7529dc05437a82496187ef06b852be9ab1 (patch) | |
tree | 2f45e5e1e9e79ff7f02bef40ef0a793b4a05fd2f /extensions-builtin/Lora/networks.py | |
parent | 2e07a8ae6b1d92838b3a8a0f6eaf5fcf4a92d48f (diff) | |
download | stable-diffusion-webui-gfx803-35510f7529dc05437a82496187ef06b852be9ab1.tar.gz stable-diffusion-webui-gfx803-35510f7529dc05437a82496187ef06b852be9ab1.tar.bz2 stable-diffusion-webui-gfx803-35510f7529dc05437a82496187ef06b852be9ab1.zip |
add alias to lyco network
read networks from LyCORIS dir if it exists
add credits
Diffstat (limited to 'extensions-builtin/Lora/networks.py')
-rw-r--r-- | extensions-builtin/Lora/networks.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/extensions-builtin/Lora/networks.py b/extensions-builtin/Lora/networks.py index 401430e8..7b4c0312 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
+from modules import shared, devices, sd_models, errors, scripts, sd_hijack, paths
module_types = [
network_lora.ModuleTypeLora(),
@@ -399,6 +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"]))
for filename in candidates:
if os.path.isdir(filename):
continue
|