Update generate.py

This commit is contained in:
Jordan
2023-02-20 21:33:20 -07:00
parent 8f527c2b2d
commit e2b6dfeeb9

View File

@@ -482,6 +482,8 @@ class Generate:
if self.model.lora_manager:
prompt = self.model.lora_manager.configure_prompt(prompt)
# lora MUST process prompt before conditioning
self.model.lora_manager.load_lora()
# apply the concepts library to the prompt
prompt = self.huggingface_concepts_library.replace_concepts_with_triggers(
@@ -513,10 +515,6 @@ class Generate:
except AttributeError:
pass
# lora MUST process prompt before conditioning
if self.model.lora_manager:
self.model.lora_manager.load_lora()
try:
uc, c, extra_conditioning_info = get_uc_and_c_and_ec(
prompt,