Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Load and save video-processor from separate folder #33562

Merged
merged 2 commits into from
Sep 19, 2024

Conversation

zucchini-nlp
Copy link
Member

@zucchini-nlp zucchini-nlp commented Sep 18, 2024

What does this PR do?

Fixes #33484.

One thing to note is that we are forced to save in a separate folder, not a json file with video_ prefix. I see a workaround here by accepting save_filename when saving image processorr, but seems quite against the general idea of saving/loading in transformers. So I guess we can leave it as separate folder and for this model only we'll maintain folder loading for a while, even after new video processor class is addded

cc @yonigozlan

@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

@amyeroberts amyeroberts left a comment

Choose a reason for hiding this comment

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

Thanks for adding this patch!

@zucchini-nlp
Copy link
Member Author

zucchini-nlp commented Sep 19, 2024

Will update files in the hub soon, merging for now. Loading with old format works anyway

@zucchini-nlp zucchini-nlp merged commit e40bb48 into huggingface:main Sep 19, 2024
12 checks passed
@zucchini-nlp
Copy link
Member Author

Done! Updated and tested by loading back

itazap pushed a commit to NielsRogge/transformers that referenced this pull request Sep 20, 2024
* load and save from video-processor folder

* Update src/transformers/models/llava_onevision/processing_llava_onevision.py

Co-authored-by: amyeroberts <[email protected]>

---------

Co-authored-by: amyeroberts <[email protected]>
amyeroberts added a commit to amyeroberts/transformers that referenced this pull request Oct 2, 2024
* load and save from video-processor folder

* Update src/transformers/models/llava_onevision/processing_llava_onevision.py

Co-authored-by: amyeroberts <[email protected]>

---------

Co-authored-by: amyeroberts <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Saving and loading LlavaOnevisionProcessor results in unexpected behavior
3 participants