Commit 9e910c4
Fix SD2.X clip single file load projection_dim (#10770)
* Fix SD2.X clip single file load projection_dim
Infer projection_dim from the checkpoint before loading
from pretrained, override any incorrect hub config.
Hub configuration for SD2.X specifies projection_dim=512
which is incorrect for SD2.X checkpoints loaded from civitai
and similar.
Exception was previously thrown upon attempting to
load_model_dict_into_meta for SD2.X single file checkpoints.
Such LDM models usually require projection_dim=1024
* convert_open_clip_checkpoint use hidden_size for text_proj_dim
* convert_open_clip_checkpoint, revert checkpoint[text_proj_key].shape[1] -> [0]
values are identical
---------
Co-authored-by: Teriks <[email protected]>
Co-authored-by: Dhruv Nair <[email protected]>1 parent 5e3b7d2 commit 9e910c4
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1448 | 1448 | | |
1449 | 1449 | | |
1450 | 1450 | | |
1451 | | - | |
1452 | | - | |
| 1451 | + | |
| 1452 | + | |
1453 | 1453 | | |
1454 | 1454 | | |
1455 | 1455 | | |
| |||
0 commit comments