Commit a2749ec6 authored by AUTOMATIC's avatar AUTOMATIC

load Lora from .ckpt also

parent 63b82437
...@@ -179,7 +179,10 @@ def list_available_loras(): ...@@ -179,7 +179,10 @@ def list_available_loras():
os.makedirs(lora_dir, exist_ok=True) 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): for filename in sorted(candidates):
if os.path.isdir(filename): if os.path.isdir(filename):
...@@ -195,4 +198,3 @@ available_loras = {} ...@@ -195,4 +198,3 @@ available_loras = {}
loaded_loras = [] loaded_loras = []
list_available_loras() list_available_loras()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment