Skip to content

Commit

Permalink
Fix a bug in the state dict judgment in ip_adapter.py. (#10095)
Browse files Browse the repository at this point in the history
* fix a judging state dict bug in ip_adapter.py

* make

---------

Co-authored-by: hlky <[email protected]>
  • Loading branch information
zhangp365 and hlky authored Dec 5, 2024
1 parent 04bba38 commit 73dac0c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/diffusers/loaders/ip_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ def load_ip_adapter(
state_dict = pretrained_model_name_or_path_or_dict

keys = list(state_dict.keys())
if keys != ["image_proj", "ip_adapter"]:
if "image_proj" not in keys and "ip_adapter" not in keys:
raise ValueError("Required keys are (`image_proj` and `ip_adapter`) missing from the state dict.")

state_dicts.append(state_dict)
Expand Down

0 comments on commit 73dac0c

Please sign in to comment.