Skip to content

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
@github-actions
Copy link
Contributor

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
@qubvel
Copy link
Contributor

qubvel commented Mar 3, 2025

Thanks for the PR @MSt-10!

@qubvel
Copy link
Contributor

qubvel commented Mar 3, 2025

run-slow: sam

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2025

This comment contains run-slow, running the specified jobs: This comment contains run-slow, running the specified jobs:

models: ['models/sam']
quantizations: [] ...

@qubvel qubvel self-requested a review March 3, 2025 16:19
@qubvel qubvel merged commit 3e83ee7 into huggingface:main Mar 3, 2025
15 of 16 checks passed
@qubvel qubvel added the Vision label Mar 3, 2025
garrett361 pushed a commit to garrett361/transformers that referenced this pull request Mar 4, 2025
transformers/image_processing_utils.py:41: UserWarning: The following named arguments are not valid for `SamImageProcessor.preprocess` and were ignored: 'point_pad_value'
garrett361 pushed a commit to garrett361/transformers that referenced this pull request Mar 4, 2025
transformers/image_processing_utils.py:41: UserWarning: The following named arguments are not valid for `SamImageProcessor.preprocess` and were ignored: 'point_pad_value'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants