File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 9393 "model.diffusion_model.double_blocks.0.img_attn.norm.key_norm.scale" ,
9494 ],
9595 "autoencoder-dc" : "decoder.stages.1.op_list.0.main.conv.conv.bias" ,
96+ "autoencoder-dc-sana" : "encoder.project_in.conv.bias" ,
9697}
9798
9899DIFFUSERS_DEFAULT_PIPELINE_PATHS = {
@@ -572,9 +573,9 @@ def infer_diffusers_model_type(checkpoint):
572573
573574 elif CHECKPOINT_KEY_NAMES ["autoencoder-dc" ] in checkpoint :
574575 encoder_key = "encoder.project_in.conv.conv.bias"
575- decoder_key = "decoder.project_out.op_list.0 .weight"
576+ decoder_key = "decoder.project_in.main.conv .weight"
576577
577- if checkpoint [ encoder_key ]. shape [ - 1 ] == 128 and checkpoint [ decoder_key ]. shape [ 1 ] == 32 :
578+ if CHECKPOINT_KEY_NAMES [ "autoencoder-dc-sana" ] in checkpoint :
578579 model_type = "autoencoder-dc-f32c32-sana"
579580
580581 elif checkpoint [encoder_key ].shape [- 1 ] == 64 and checkpoint [decoder_key ].shape [1 ] == 32 :
@@ -2276,7 +2277,8 @@ def remap_proj_conv_(key: str, state_dict):
22762277 "qkv.conv.weight" : remap_qkv_ ,
22772278 "proj.conv.weight" : remap_proj_conv_ ,
22782279 }
2279- AE_KEYS_RENAME_DICT .update (AE_F32C32_F64C128_F128C512_KEYS )
2280+ if "encoder.project_in.conv.bias" not in converted_state_dict :
2281+ AE_KEYS_RENAME_DICT .update (AE_F32C32_F64C128_F128C512_KEYS )
22802282
22812283 for key in list (converted_state_dict .keys ()):
22822284 new_key = key [:]
You can’t perform that action at this time.
0 commit comments