Error when loading HunyuanDiTCLIPTextEncoder: Missing key "embeddings.position_ids" in state_dict
Thank you for your help and support!
Issue Description
An error occurred while running ExVideo_svd_test.py. The error happens when loading the HunyuanDiTCLIPTextEncoder model, indicating a missing key "embeddings.position_ids" in the state dictionary.
Execute the following command:
python examples/ExVideo/ExVideo_svd_test.py
output
pytorch_model.bin has been already in models/HunyuanDiT/t2i/clip_text_encoder.
pytorch_model.bin has been already in models/HunyuanDiT/t2i/mt5.
pytorch_model_ema.pt has been already in models/HunyuanDiT/t2i/model.
diffusion_pytorch_model.bin has been already in models/HunyuanDiT/t2i/sdxl-vae-fp16-fix.
Traceback (most recent call last):
File "/home/hans/DiffSynth-Studio/examples/ExVideo/ExVideo_svd_test.py", line 88, in
I suspect that the model file encountered an error during the download process. You can delete the file models/HunyuanDiT/t2i/clip_text_encoder/pytorch_model.bin and download it again, or alternatively, you can manually download it using the link provided in the comments of ExVideo_svd_test.py.
I updated the version of transformers to the latest version and that solved the problem