Skip to content

Conversation

kashif
Copy link
Collaborator

@kashif kashif commented Sep 22, 2025

fixes issue #4061

@kashif kashif requested a review from qgallouedec September 22, 2025 19:37
@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.

else:
effective_max_length = self.max_prompt_length

prompt_ids, prompt_mask = truncate_with_protected_tokens(
Copy link
Member

@qgallouedec qgallouedec Sep 22, 2025

Choose a reason for hiding this comment

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

so here, if you've a prompt that contains more than self.max_prompt_length image tokens, you'll effectively get a prompt_ids.shape[1] > self.max_prompt_length?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes that is correct

@kashif
Copy link
Collaborator Author

kashif commented Sep 23, 2025

Closing as the issue is not fixed

@kashif kashif closed this Sep 23, 2025
@kashif kashif reopened this Sep 23, 2025
@kashif kashif closed this Sep 23, 2025
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.

3 participants