Skip to content

Commit c88b6c1

Browse files
authored
convert_open_clip_checkpoint, revert checkpoint[text_proj_key].shape[1] -> [0]
values are identical
1 parent d25c76a commit c88b6c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/diffusers/loaders/single_file_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1447,7 +1447,7 @@ def convert_open_clip_checkpoint(
14471447
text_proj_key = prefix + "text_projection"
14481448

14491449
if text_proj_key in checkpoint:
1450-
text_proj_dim = int(checkpoint[text_proj_key].shape[1])
1450+
text_proj_dim = int(checkpoint[text_proj_key].shape[0])
14511451
elif hasattr(text_model.config, "hidden_size"):
14521452
text_proj_dim = text_model.config.hidden_size
14531453
else:

0 commit comments

Comments
 (0)