Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Update Video Loading/Export to use imageio #9094

Merged
merged 10 commits into from
Aug 12, 2024
Merged

Update Video Loading/Export to use imageio #9094

merged 10 commits into from
Aug 12, 2024

Conversation

DN6
Copy link
Collaborator

@DN6 DN6 commented Aug 6, 2024

What does this PR do?

This PR changes the video loading/export backends to imageio

imageio with ffmpeg loading and export allows videos to play on a larger number of platforms. It also appears less prone to codec issues than OpenCV.

Fixes # (issue)

Before submitting

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Collaborator

@yiyixuxu yiyixuxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!
do we also need to add to the BACKENDS_MAPPING here?

BACKENDS_MAPPING = OrderedDict(

@DN6
Copy link
Collaborator Author

DN6 commented Aug 6, 2024

@yiyixuxu This would "break" a few repos that rely on export_to_video though. Since they would now have to install a new dependency
https://github.com/search?q=%22from+diffusers.utils+import+export_to_video%22&type=code

@yiyixuxu
Copy link
Collaborator

yiyixuxu commented Aug 6, 2024

@DN6
ohh maybe let's keep the old code then?
we use imageio if is_imageio_available, otherwise, we use the old code, throw a warning that it might not work, and ask them to install imageio

@DN6 DN6 merged commit 10dc06c into main Aug 12, 2024
18 checks passed
@sayakpaul sayakpaul deleted the video-export-update branch August 12, 2024 04:57
yiyixuxu pushed a commit that referenced this pull request Aug 24, 2024
* update

* update

* update

---------

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
sayakpaul added a commit that referenced this pull request Dec 23, 2024
* update

* update

* update

---------

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants