-
Notifications
You must be signed in to change notification settings - Fork 221
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 llava/llava next issue when working with AutoProcessor #1674
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Wang, Yi A <[email protected]>
for llava: |
for llava_next: |
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. |
see huggingface/transformers@a29eabd#diff-178e0eb55a6cf5582be26cd37dc04bdef1f03fe17a5ce8d73521e19cca43dc9fR417 that move "expand input" to Autoprocessor |
@lkk12014402 @yuanwu2017 please help review |
legacy_processing = ( | ||
(input_ids == self.config.image_token_index).sum(1).max() < self.config.image_seq_length | ||
) or ((input_ids.shape[-1] == 1 if token_idx is None else token_idx == 1) and pixel_values is not None) | ||
if token_idx is not None and pixel_values is not None and legacy_processing: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it affect static shapes optimization?
crash if running following script