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

Fix kwargs UserWarning in SamImageProcessor #36479

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

MSt-10
Copy link
Contributor

@MSt-10 MSt-10 commented Feb 28, 2025

What does this PR do?

Fixes a user warning when using the SamProcessor.

transformers/image_processing_utils.py:41: UserWarning: The following named arguments are not valid for `SamImageProcessor.preprocess` and were ignored: 'point_pad_value'

The SamProcessorKwargs contain the argument point_pad_value but this is only needed by the SamProcessor and not by the SamImageProcessor, hence a warning is generated when calling the SamImageProcessor here.
I removed the argument from the dictionary similarly to how e.g. input_points are handled since they are also not needed by the SamImageProcessor.

Who can review?

@qubvel

transformers/image_processing_utils.py:41: UserWarning: The following named arguments are not valid for `SamImageProcessor.preprocess` and were ignored: 'point_pad_value'
@github-actions github-actions bot marked this pull request as draft February 28, 2025 16:47
Copy link

Hi 👋, thank you for opening this pull request! The pull request is converted to draft by default. When it is ready for review, please click the Ready for review button (at the bottom of the PR page).

@MSt-10 MSt-10 marked this pull request as ready for review February 28, 2025 16:51
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.

1 participant