diff options
author | AUTOMATIC <16777216c@gmail.com> | 2023-01-21 15:52:45 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2023-01-21 15:52:45 +0000 |
commit | a2749ec655af93d96ea7ebed85e8c1e7c5072b02 (patch) | |
tree | f7f55fd6ec90f4a4bf7490df8c30234efabf88b0 | |
parent | 63b824376c49013880ff44c260ea426e2899511e (diff) | |
download | stable-diffusion-webui-gfx803-a2749ec655af93d96ea7ebed85e8c1e7c5072b02.tar.gz stable-diffusion-webui-gfx803-a2749ec655af93d96ea7ebed85e8c1e7c5072b02.tar.bz2 stable-diffusion-webui-gfx803-a2749ec655af93d96ea7ebed85e8c1e7c5072b02.zip |
load Lora from .ckpt also
-rw-r--r-- | extensions-builtin/Lora/lora.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/extensions-builtin/Lora/lora.py b/extensions-builtin/Lora/lora.py index 7a3ad9a9..6d860224 100644 --- a/extensions-builtin/Lora/lora.py +++ b/extensions-builtin/Lora/lora.py @@ -179,7 +179,10 @@ def list_available_loras(): os.makedirs(lora_dir, exist_ok=True)
- candidates = glob.glob(os.path.join(lora_dir, '**/*.pt'), recursive=True) + glob.glob(os.path.join(lora_dir, '**/*.safetensors'), recursive=True)
+ candidates = \
+ glob.glob(os.path.join(lora_dir, '**/*.pt'), recursive=True) + \
+ glob.glob(os.path.join(lora_dir, '**/*.safetensors'), recursive=True) + \
+ glob.glob(os.path.join(lora_dir, '**/*.ckpt'), recursive=True)
for filename in sorted(candidates):
if os.path.isdir(filename):
@@ -195,4 +198,3 @@ available_loras = {} loaded_loras = []
list_available_loras()
-
|