Update invokeai/app/invocations/model.py

Co-authored-by: Ryan Dick <ryanjdick3@gmail.com>
This commit is contained in:
Lincoln Stein
2023-10-08 22:55:22 -04:00
committed by GitHub
parent ce2baa36a9
commit a80ff75b52

View File

@ -174,7 +174,7 @@ class LoraLoaderInvocation(BaseInvocation):
key = self.lora.key key = self.lora.key
if not context.services.model_record_store.model_exists(key): if not context.services.model_record_store.model_exists(key):
raise Exception(f"Unkown lora: {key}!") raise Exception(f"Unknown lora: {key}!")
if self.unet is not None and any(lora.key == key for lora in self.unet.loras): if self.unet is not None and any(lora.key == key for lora in self.unet.loras):
raise Exception(f'Lora "{key}" already applied to unet') raise Exception(f'Lora "{key}" already applied to unet')