Skip to content

Commit

Permalink
fix previous commit: bad condition (#455)
Browse files Browse the repository at this point in the history
  • Loading branch information
oOraph authored Sep 26, 2024
1 parent a053bdc commit 8b71cc4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions docker_images/diffusers/app/lora.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,10 @@ def _load_lora_adapter(self, kwargs):
logger.error(msg)
raise ValueError(msg)
base_model = model_data.cardData["base_model"]
if (
isinstance(base_model, list) and (self.model_id not in base_model)
) or (self.model_id != base_model):
is_list = isinstance(base_model, list)
if (is_list and (self.model_id not in base_model)) or (
not is_list and self.model_id != base_model
):
msg = f"Requested adapter {adapter:s} is not a LoRA adapter for base model {self.model_id:s}"
logger.error(msg)
raise ValueError(msg)
Expand Down

0 comments on commit 8b71cc4

Please sign in to comment.