Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
diffusers
Commits
8e946635
Unverified
Commit
8e946635
authored
Jan 30, 2024
by
Dhruv Nair
Committed by
GitHub
Jan 30, 2024
Browse files
Update export to video to support new `tensor_to_vid` function in video pipelines (#6715)
update
parent
b09b90e2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
src/diffusers/utils/export_utils.py
src/diffusers/utils/export_utils.py
+4
-1
No files found.
src/diffusers/utils/export_utils.py
View file @
8e946635
...
...
@@ -125,7 +125,10 @@ def export_to_video(
if
output_video_path
is
None
:
output_video_path
=
tempfile
.
NamedTemporaryFile
(
suffix
=
".mp4"
).
name
if
isinstance
(
video_frames
[
0
],
PIL
.
Image
.
Image
):
if
isinstance
(
video_frames
[
0
],
np
.
ndarray
):
video_frames
=
[(
frame
*
255
).
astype
(
np
.
uint8
)
for
frame
in
video_frames
]
elif
isinstance
(
video_frames
[
0
],
PIL
.
Image
.
Image
):
video_frames
=
[
np
.
array
(
frame
)
for
frame
in
video_frames
]
fourcc
=
cv2
.
VideoWriter_fourcc
(
*
"mp4v"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment