Load more than one LoRA with --lora, fix a bug
This commit is contained in:
parent
15940e762e
commit
f39c99fa14
4 changed files with 4 additions and 4 deletions
|
@ -7,10 +7,10 @@ import modules.shared as shared
|
|||
|
||||
|
||||
def add_lora_to_model(lora_names):
|
||||
shared.lora_names = list(lora_names)
|
||||
prior_set = set(shared.lora_names)
|
||||
added_set = set(lora_names) - prior_set
|
||||
removed_set = prior_set - set(lora_names)
|
||||
shared.lora_names = list(lora_names)
|
||||
|
||||
# If no LoRA needs to be added or removed, exit
|
||||
if len(added_set) == 0 and len(removed_set) == 0:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue