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:
|
||||
|
|
|
@ -96,7 +96,7 @@ parser.add_argument('--chat', action='store_true', help='Launch the web UI in ch
|
|||
parser.add_argument('--cai-chat', action='store_true', help='DEPRECATED: use --chat instead.')
|
||||
parser.add_argument('--character', type=str, help='The name of the character to load in chat mode by default.')
|
||||
parser.add_argument('--model', type=str, help='Name of the model to load by default.')
|
||||
parser.add_argument('--lora', type=str, help='Name of the LoRA to apply to the model by default.')
|
||||
parser.add_argument('--lora', type=str, nargs="+", help='The list of LoRAs to load. If you want to load more than one LoRA, write the names separated by spaces.')
|
||||
parser.add_argument("--model-dir", type=str, default='models/', help="Path to directory with all the models")
|
||||
parser.add_argument("--lora-dir", type=str, default='loras/', help="Path to directory with all the loras")
|
||||
parser.add_argument('--model-menu', action='store_true', help='Show a model menu in the terminal when the web UI is first launched.')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue