Skip to content

Commit

Permalink
Merge pull request #11123 from akx/dont-die-on-bad-symlink-lora
Browse files Browse the repository at this point in the history
Don't die when a LoRA is a broken symlink
  • Loading branch information
AUTOMATIC1111 authored Jun 9, 2023
2 parents f9606b8 + d75ed52 commit b8d7506
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion extensions-builtin/Lora/lora.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,11 @@ def list_available_loras():
continue

name = os.path.splitext(os.path.basename(filename))[0]
entry = LoraOnDisk(name, filename)
try:
entry = LoraOnDisk(name, filename)
except OSError: # should catch FileNotFoundError and PermissionError etc.
errors.report(f"Failed to load LoRA {name} from {filename}", exc_info=True)
continue

available_loras[name] = entry

Expand Down

0 comments on commit b8d7506

Please sign in to comment.