Skip to content

fix: ImageTextToTextPipeline handles user-defined generation_config #39374

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

Conversation

peteryschneider
Copy link
Contributor

What does this PR do?

This allows an ImageTextToTextPipeline object to handle a user-defined generation_config passed to the pipeline, the same way a TextGenerationPipeline object does. Currently, it ignores these generation_config parameters set on pipeline object initialization, causing unexpected text generation behavior.

@Rocketknight1

@Rocketknight1
Copy link
Member

Makes sense - cc @zucchini-nlp, I assume there are no issues with passing generation_config to VLMs the same way we pass it to text models?

Copy link
Member

@zucchini-nlp zucchini-nlp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, seems oke to me

@HuggingFaceDocBuilderDev

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.

@zucchini-nlp zucchini-nlp enabled auto-merge (squash) July 17, 2025 07:22
@zucchini-nlp zucchini-nlp merged commit 7fd6004 into huggingface:main Jul 17, 2025
25 checks passed
rjgleaton pushed a commit to rjgleaton/transformers that referenced this pull request Jul 17, 2025
…uggingface#39374)

fix: ImageTextToTextPipeline handles user-defined generation_config passed to the pipeline

Co-authored-by: Raushan Turganbay <[email protected]>
zucchini-nlp added a commit to zucchini-nlp/transformers that referenced this pull request Jul 22, 2025
…uggingface#39374)

fix: ImageTextToTextPipeline handles user-defined generation_config passed to the pipeline

Co-authored-by: Raushan Turganbay <[email protected]>
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.

4 participants