Skip to content

Commit

Permalink
Patch del self.loaded_lora to prevent error with persistent lora_name…
Browse files Browse the repository at this point in the history
… swapping
  • Loading branch information
ComfyUI-Community authored Jul 16, 2023
1 parent 490771b commit a8f3bbc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,9 @@ def load_lora(self, model, clip, lora_name, strength_model, strength_clip):
if self.loaded_lora[0] == lora_path:
lora = self.loaded_lora[1]
else:
del self.loaded_lora
temp = self.loaded_lora
self.loaded_lora = None
del temp

if lora is None:
lora = comfy.utils.load_torch_file(lora_path, safe_load=True)
Expand Down

0 comments on commit a8f3bbc

Please sign in to comment.