Skip to content

Commit 8b71cc4

Browse files
authored
fix previous commit: bad condition (#455)
1 parent a053bdc commit 8b71cc4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

docker_images/diffusers/app/lora.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,10 @@ def _load_lora_adapter(self, kwargs):
158158
logger.error(msg)
159159
raise ValueError(msg)
160160
base_model = model_data.cardData["base_model"]
161-
if (
162-
isinstance(base_model, list) and (self.model_id not in base_model)
163-
) or (self.model_id != base_model):
161+
is_list = isinstance(base_model, list)
162+
if (is_list and (self.model_id not in base_model)) or (
163+
not is_list and self.model_id != base_model
164+
):
164165
msg = f"Requested adapter {adapter:s} is not a LoRA adapter for base model {self.model_id:s}"
165166
logger.error(msg)
166167
raise ValueError(msg)

0 commit comments

Comments
 (0)