Skip to content

Commit 73dac0c

Browse files
zhangp365hlky
andauthored
Fix a bug in the state dict judgment in ip_adapter.py. (#10095)
* fix a judging state dict bug in ip_adapter.py * make --------- Co-authored-by: hlky <hlky@hlky.ac>
1 parent 04bba38 commit 73dac0c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/diffusers/loaders/ip_adapter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ def load_ip_adapter(
187187
state_dict = pretrained_model_name_or_path_or_dict
188188

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

193193
state_dicts.append(state_dict)

0 commit comments

Comments
 (0)