showlab / MotionDirector

[ECCV 2024 Oral] MotionDirector: Motion Customization of Text-to-Video Diffusion Models.
https://showlab.github.io/MotionDirector/
Apache License 2.0
791 stars 44 forks source link

Error occurred on loras #11

Open Crd1140234468 opened 9 months ago

Crd1140234468 commented 9 months ago

Hi, thanks for releasing the nice work. When I try to run the Train MotionDirector on a single video, using the provided data ''./test_data/car_turn/car-turn-24.mp4'', the code encounters an error Traceback (most recent call last): File "MotionDirector_train.py", line 1024, in main(**OmegaConf.load(args.config)) File "MotionDirector_train.py", line 894, in main loss_spatial, loss_temporal, latents, init_noise = finetune_unet(batch, step, mask_spatial_lora=mask_spatial_lora, mask_temporal_lora=mask_temporal_lora) File "MotionDirector_train.py", line 820, in finetune_unet loras[lora_idx + step].scale = 1. IndexError: list index out of range

What is going on?

ruizhaocv commented 9 months ago

Hi. Which config file did you use? Did you set the num_frames to 24?

Crd1140234468 commented 9 months ago

Hi. Which config file did you use? Did you set the num_frames to 24?

I am using config_single_video_24.yaml, and when only replacing the training video, I found that using my own video will detect num_examples=2, what is the reason?

Crd1140234468 commented 9 months ago

But after I restored all the default settings of ''config_single_video_24.yaml'', the demo''car_turn/car-turn-24.mp4'' can be trained.

ruizhaocv commented 9 months ago

Hi. This is because your video has more than 24 frames. The training script has been updated for this issue. You can try the new script now.

Crd1140234468 commented 9 months ago

Thank you for your reply. I have successfully trained my own video according to the newly updated scripts. In addition, if the training video used exceeds 24 frames, will it affect the training effect?

ruizhaocv commented 8 months ago

It's OK. I think it will not significantly impact the results.