mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2024-12-29 19:05:05 +08:00
load Lora from .ckpt also
This commit is contained in:
parent
63b824376c
commit
a2749ec655
@ -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()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user