Fix inference error in LlavaNextForConditionalGeneration with text-only input - #35554
Closed
CatcherInThePy wants to merge 3 commits into
Closed
Fix inference error in LlavaNextForConditionalGeneration with text-only input#35554CatcherInThePy wants to merge 3 commits into
CatcherInThePy wants to merge 3 commits into
Conversation
…e data is provided This fix addresses an issue where running inference without image data causes an error on line 874, as `image_features` is `None`. The update restructures the checks for `image_features` and `legacy_processing` to properly handle cases where no image data is present, while preserving the integrity of the remaining processing steps.
Contributor
Removed empty lines and whitespaces
zucchini-nlp
reviewed
Jan 8, 2025
zucchini-nlp
left a comment
Member
There was a problem hiding this comment.
Hey, thanks for the PR but we already have merged a fix for LLaVA models today #34502. Feel free to update to the latest main branch :)
Author
|
Hello @zucchini-nlp, That's fantastic news! Perfect timing as well ^-^ Thank you so much for the heads-up. I'm looking forward to more opportunities to contribute in the future. :) I am closing the PR. Best. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This simple fix addresses an issue where running inference with text-only input (a.k.a. without any image data ) causes an error on line 874, as
image_featuresisNone. The update restructures the checks forimage_featuresandlegacy_processingto properly handle cases where no image data is present, while preserving the integrity of the remaining processing steps. This is a suggested fix to the reported issue #35421Fixes #35421
Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
Vision models: @amyeroberts, @qubvel