Skip to content

Add ImageProcessorFast to BiT processor - #37180

Merged
yonigozlan merged 14 commits into
huggingface:mainfrom
Yann-CV:fastprocessor/bit
Apr 14, 2025
Merged

yonigozlan merged 14 commits into
huggingface:mainfrom
Yann-CV:fastprocessor/bit

Conversation

@Yann-CV

@Yann-CV Yann-CV commented Apr 1, 2025 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Following #36978:

This pull request introduces a new fast image processor class for the BiT model along with the necessary updates to integrate it into the existing codebase. The most important changes include the addition of the BitImageProcessorFast class, modifications to the initialization and import structures, and updates to the documentation and tests.

New Feature Addition:

Integration Updates:

Documentation Updates:

  • docs/source/en/model_doc/bit.md and docs/source/ja/model_doc/bit.md: Added documentation entries for the new BitImageProcessorFast class. [1] [2]

Testing:

Dummy Objects:

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a Github issue or the forum? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes? Here are the
    documentation guidelines, and
    here are tips on formatting docstrings.
  • Did you write any new necessary tests?

@Yann-CV
Yann-CV marked this pull request as ready for review April 2, 2025 07:57
@github-actions
github-actions Bot requested review from ydshieh and yonigozlan April 2, 2025 07:58
@Yann-CV

Yann-CV commented Apr 2, 2025

Copy link
Copy Markdown
Contributor Author

do not know why test are taking forever

@Rocketknight1

Copy link
Copy Markdown
Member

@Yann-CV try rebasing to trigger the tests if they don't start automatically once you mark it ready for review!

@Yann-CV

Yann-CV commented Apr 2, 2025

Copy link
Copy Markdown
Contributor Author

worked thanks @Rocketknight1

@Yann-CV

Yann-CV commented Apr 2, 2025

Copy link
Copy Markdown
Contributor Author

@ydshieh @yonigozlan this one looks ready to be reviewed

@yonigozlan yonigozlan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks great @Yann-CV thanks for contributing, and thanks for adding tests! a few things to remove then LGTM

Comment thread setup.py
Comment thread src/transformers/models/bit/image_processing_bit_fast.py Outdated
Comment thread src/transformers/models/bit/image_processing_bit_fast.py Outdated
Yann-CV and others added 5 commits April 3, 2025 11:00
Co-authored-by: Yoni Gozlan <74535834+yonigozlan@users.noreply.github.com>
Co-authored-by: Yoni Gozlan <74535834+yonigozlan@users.noreply.github.com>
Co-authored-by: Yoni Gozlan <74535834+yonigozlan@users.noreply.github.com>
@Yann-CV
Yann-CV requested a review from yonigozlan April 3, 2025 10:52
@Yann-CV

Yann-CV commented Apr 3, 2025

Copy link
Copy Markdown
Contributor Author

@yonigozlan should be good now

@yonigozlan yonigozlan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Perfect! Thanks for iterating 馃.
Let's wait for @ArthurZucker final approval before merging

@HuggingFaceDocBuilderDev

Copy link
Copy Markdown

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.

@yonigozlan
yonigozlan merged commit 4774a39 into huggingface:main Apr 14, 2025
cyr0930 pushed a commit to cyr0930/transformers that referenced this pull request Apr 18, 2025
* Add ImageProcessorFast to BiT processor

* propose a fast processor and add tests

* all tests pass except one

* run make

* remove useless print

* use same test as clip

* apply make

* Update src/transformers/models/bit/image_processing_bit_fast.py

Co-authored-by: Yoni Gozlan <74535834+yonigozlan@users.noreply.github.com>

* Update setup.py

Co-authored-by: Yoni Gozlan <74535834+yonigozlan@users.noreply.github.com>

* Update src/transformers/models/bit/image_processing_bit_fast.py

Co-authored-by: Yoni Gozlan <74535834+yonigozlan@users.noreply.github.com>

* apply review comment

---------

Co-authored-by: Yoni Gozlan <74535834+yonigozlan@users.noreply.github.com>
zucchini-nlp pushed a commit to zucchini-nlp/transformers that referenced this pull request May 14, 2025
* Add ImageProcessorFast to BiT processor

* propose a fast processor and add tests

* all tests pass except one

* run make

* remove useless print

* use same test as clip

* apply make

* Update src/transformers/models/bit/image_processing_bit_fast.py

Co-authored-by: Yoni Gozlan <74535834+yonigozlan@users.noreply.github.com>

* Update setup.py

Co-authored-by: Yoni Gozlan <74535834+yonigozlan@users.noreply.github.com>

* Update src/transformers/models/bit/image_processing_bit_fast.py

Co-authored-by: Yoni Gozlan <74535834+yonigozlan@users.noreply.github.com>

* apply review comment

---------

Co-authored-by: Yoni Gozlan <74535834+yonigozlan@users.noreply.github.com>
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.

4 participants