ali-vilab / UniAnimate

Code for Paper "UniAnimate: Taming Unified Video Diffusion Models for Consistent Human Image Animation".
https://unianimate.github.io/
982 stars 52 forks source link

Videos (and output images) are not saved after inferring #6

Closed xuanlongORZ closed 3 months ago

xuanlongORZ commented 3 months ago

maybe it is better to erase 'os.system(f'rm -rf {frame_dir}')' in this line, otherwise nothing will be saved but just a log file: https://github.com/ali-vilab/UniAnimate/blob/4e5bed683136cdd5489d6202f34b2fe87a5902eb/utils/video_op.py#L325

BTW, maybe it is better to save a video using cv2.VideoWriter in the for-loop above the above line.

wangxiang1230 commented 3 months ago

maybe it is better to erase 'os.system(f'rm -rf {frame_dir}')' in this line, otherwise nothing will be saved but just a log file:

https://github.com/ali-vilab/UniAnimate/blob/4e5bed683136cdd5489d6202f34b2fe87a5902eb/utils/video_op.py#L325

BTW, maybe it is better to save a video using cv2.VideoWriter in the for-loop above the above line.

Hi, thanks for your suggestion. We did this in order to save only the .mp4 file and not the images. And ffmpeg can help to save high-quality videos.

xuanlongORZ commented 3 months ago

OK I see.. but by running directly the inference code, I didn't get either images or the video LOL, that's why I raised this issue. I'm not sure if it happens only on me..

JunrQ commented 3 months ago

My ffmpeg failed to save the video due to no 'x264' encoder.

OK I see.. but by running directly the inference code, I didn't get either images or the video LOL, that's why I raised this issue. I'm not sure if it happens only on me..

Starzilla29 commented 3 months ago

It appeared in UniAnimate/outputs/custom_infer_long/ for me, is it not there for you?

Note: custom_infer_long was the name of my yaml

wangxiang1230 commented 3 months ago

Hi, the bug is fixed. Please refer to https://github.com/ali-vilab/UniAnimate/blob/ea6d185e894939b66502e6a60dfbe7451430ba35/utils/video_op.py#L317-L340

Thank @xuanlongORZ for the suggestion.

xuanlongORZ commented 3 months ago

Hi, the bug is fixed. Please refer to

https://github.com/ali-vilab/UniAnimate/blob/ea6d185e894939b66502e6a60dfbe7451430ba35/utils/video_op.py#L317-L340

Thank @xuanlongORZ for the suggestion.

It works ! Thank you for your awesome work :D