-
Notifications
You must be signed in to change notification settings - Fork 31.1k
Fix issue with from pretrained and kwargs in image processors #41997
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
Changes from all commits
b5c2aaf
74d56be
2a95622
a2e6c5c
96a2a70
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -219,6 +219,9 @@ class methods and docstrings. | |
| - `'np'`: Return NumPy `np.ndarray` objects. | ||
| disable_grouping (`bool`, *optional*): | ||
| Whether to group images by shapes when processing or not, only relevant for fast image processing. | ||
| image_seq_length (`int`, *optional*): | ||
| The number of image tokens to be used for each image in the input. | ||
| Added for backward compatibility but this should be set as a processor attribute in future models. | ||
|
Comment on lines
+222
to
+224
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sorry for nitty-picking after PR is merged, For my own understanding, do we need it in here, because not all image processors are VLM-specific and
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No worries, I agree with you we shouldn't really have this here, as this should be a processor attribute, but a lot of models on the hub have it as an image processor attribute, so I put it here for BC... |
||
| """ | ||
|
|
||
| do_convert_rgb: Optional[bool] | ||
|
|
@@ -239,6 +242,7 @@ class methods and docstrings. | |
| device: Annotated[Optional[str], device_validator()] | ||
| return_tensors: Annotated[Optional[Union[str, TensorType]], tensor_type_validator()] | ||
| disable_grouping: Optional[bool] | ||
| image_seq_length: Optional[int] | ||
|
|
||
|
|
||
| class VideosKwargs(TypedDict, total=False): | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.