You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
image = generate_image()
File "/home/hans/DiffSynth-Studio/examples/ExVideo/ExVideo_svd_test.py", line 34, in generate_image
model_manager = ModelManager(torch_dtype=torch.float16, device="cuda", model_id_list=["HunyuanDiT"])
File "/home/hans/DiffSynth-Studio/diffsynth/models/init.py", line 98, in init
self.load_models(downloaded_files + file_path_list)
File "/home/hans/DiffSynth-Studio/diffsynth/models/init.py", line 476, in load_models
self.load_model(file_path, lora_alphas=lora_alphas)
File "/home/hans/DiffSynth-Studio/diffsynth/models/init.py", line 464, in load_model
self.load_hunyuan_dit_clip_text_encoder(state_dict, file_path=file_path)
File "/home/hans/DiffSynth-Studio/diffsynth/models/init.py", line 360, in load_hunyuan_dit_clip_text_encoder
model.load_state_dict(model.state_dict_converter().from_civitai(state_dict))
File "/home/hans/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 2189, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for HunyuanDiTCLIPTextEncoder:
Missing key(s) in state_dict: "embeddings.position_ids".
The text was updated successfully, but these errors were encountered:
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.
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
image = generate_image()
File "/home/hans/DiffSynth-Studio/examples/ExVideo/ExVideo_svd_test.py", line 34, in generate_image
model_manager = ModelManager(torch_dtype=torch.float16, device="cuda", model_id_list=["HunyuanDiT"])
File "/home/hans/DiffSynth-Studio/diffsynth/models/init.py", line 98, in init
self.load_models(downloaded_files + file_path_list)
File "/home/hans/DiffSynth-Studio/diffsynth/models/init.py", line 476, in load_models
self.load_model(file_path, lora_alphas=lora_alphas)
File "/home/hans/DiffSynth-Studio/diffsynth/models/init.py", line 464, in load_model
self.load_hunyuan_dit_clip_text_encoder(state_dict, file_path=file_path)
File "/home/hans/DiffSynth-Studio/diffsynth/models/init.py", line 360, in load_hunyuan_dit_clip_text_encoder
model.load_state_dict(model.state_dict_converter().from_civitai(state_dict))
File "/home/hans/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 2189, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for HunyuanDiTCLIPTextEncoder:
Missing key(s) in state_dict: "embeddings.position_ids".
The text was updated successfully, but these errors were encountered: