RuntimeError: Error(s) in loading state_dict for AutoencoderKL
xx674967 opened this issue · 4 comments
Hi , Thank you for open-sourcing this project. I met an issue while running conert_ldm_to_diffusers.py, as shown in the picture.
It seems that the parameter names from the previous fine-tuning step do not match the VAE model. In your code, . Can this issue be addressed by modifying the names at this point? I look forward to your reply.
I have same question!
Hi, that should be a problem related to using different diffusers
version. You can solve this problem by modifying code in utils/ldm_utils/convert_ldm_to_diffusers.py
, changing the parameter keys from query
, key
, value
and proj_attn
to to_q
, to_k
, to_v
and to_out
.
Hi, that should be a problem related to using different
diffusers
version. You can solve this problem by modifying code inutils/ldm_utils/convert_ldm_to_diffusers.py
, changing the parameter keys fromquery
,key
,value
andproj_attn
toto_q
,to_k
,to_v
andto_out
.
I modified the code as you said above, but I encountered a question as below. Can you give me some advice? Thank you!
When I use to_out.0 to replace proj_attn encounter the below issue.
Hi, that should be a problem related to using different
diffusers
version. You can solve this problem by modifying code inutils/ldm_utils/convert_ldm_to_diffusers.py
, changing the parameter keys fromquery
,key
,value
andproj_attn
toto_q
,to_k
,to_v
andto_out
.I modified the code as you said above, but I encountered a question as below. Can you give me some advice? Thank you! When I use to_out.0 to replace proj_attn encounter the below issue.
I address this issue when I install diffusers==0.15.0 , and then run python utils/ldm_utils/main.py -t --data_root ${EXP_DIR}/png/ --logdir ${EXP_DIR}/ldm/ --reg_data_root data/dreambooth_data/class_${GENDER}_images/ --bg_root data/dreambooth_data/bg_images/ --class_word ${GENDER} --no-test --gpus 2,3