We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
tensor_to_vid
1 parent b09b90e commit 8e94663Copy full SHA for 8e94663
src/diffusers/utils/export_utils.py
@@ -125,7 +125,10 @@ def export_to_video(
125
if output_video_path is None:
126
output_video_path = tempfile.NamedTemporaryFile(suffix=".mp4").name
127
128
- if isinstance(video_frames[0], PIL.Image.Image):
+ if isinstance(video_frames[0], np.ndarray):
129
+ video_frames = [(frame * 255).astype(np.uint8) for frame in video_frames]
130
+
131
+ elif isinstance(video_frames[0], PIL.Image.Image):
132
video_frames = [np.array(frame) for frame in video_frames]
133
134
fourcc = cv2.VideoWriter_fourcc(*"mp4v")
0 commit comments