fix: do not apply loras more than one time when not using lora in prompt

This commit is contained in:
Manuel Schmid 2024-06-16 21:40:39 +02:00
parent eeb1b79baa
commit 33a9c156ad
No known key found for this signature in database
GPG Key ID: 32C4F7569B40B84B
1 changed files with 3 additions and 0 deletions

View File

@ -390,6 +390,9 @@ def get_enabled_loras(loras: list, remove_none=True) -> list:
def parse_lora_references_from_prompt(prompt: str, loras: List[Tuple[AnyStr, float]], loras_limit: int = 5,
skip_file_check=False, prompt_cleanup=True, deduplicate_loras=True,
lora_filenames=None) -> tuple[List[Tuple[AnyStr, float]], str]:
# prevent unintended side effects when returning without detection
loras = loras.copy()
if lora_filenames is None:
lora_filenames = []