diffusers icon indicating copy to clipboard operation
diffusers copied to clipboard

export_to_video issue

Open lucken99 opened this issue 2 years ago • 5 comments

This issue is coming, it was not there yesterday:

ValueError Traceback (most recent call last) in <cell line: 10>() 8 prompt = "Spiderman is surfing" 9 video_frames = pipe(prompt).frames ---> 10 video_path = export_to_video(video_frames, output_video_path="./spidey_surfing.mp4") 11 video_path

/usr/local/lib/python3.10/dist-packages/diffusers/utils/export_utils.py in export_to_video(video_frames, output_video_path, fps) 130 131 fourcc = cv2.VideoWriter_fourcc(*"mp4v") --> 132 h, w, c = video_frames[0].shape 133 video_writer = cv2.VideoWriter(output_video_path, fourcc, fps=fps, frameSize=(w, h)) 134 for i in range(len(video_frames)):

ValueError: too many values to unpack (expected 3)

lucken99 avatar Jan 23 '24 05:01 lucken99

May be because video_frames[0] has shape = (16, 256, 256, 3)

lucken99 avatar Jan 23 '24 05:01 lucken99

Problem with main but stable is working fine

lucken99 avatar Jan 23 '24 06:01 lucken99

Hi @lucken99 could you please share a code example so that I can reproduce the error. We recently merged #6626 that could cause this issue.

DN6 avatar Jan 23 '24 14:01 DN6

It's there in the post itself while calling pipe. You can check the full code here: T2V

lucken99 avatar Jan 23 '24 14:01 lucken99

fixed with https://github.com/huggingface/diffusers/pull/6715

yiyixuxu avatar Feb 18 '24 08:02 yiyixuxu