Skip to content

Commit

Permalink
Don't die when a LoRA is a broken symlink
Browse files Browse the repository at this point in the history
  • Loading branch information
akx committed Jun 9, 2023
1 parent cf28aed commit d75ed52
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 d75ed52

Please sign in to comment.