From a2749ec655af93d96ea7ebed85e8c1e7c5072b02 Mon Sep 17 00:00:00 2001 From: AUTOMATIC <16777216c@gmail.com> Date: Sat, 21 Jan 2023 18:52:45 +0300 Subject: [PATCH] load Lora from .ckpt also --- extensions-builtin/Lora/lora.py | 6 ++++-- 1 file 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() -