Skip to content

Fix the offsets in processing#46525

Merged
vasqu merged 2 commits into
huggingface:mainfrom
zucchini-nlp:fix-processor-offsets
Jun 10, 2026
Merged

Fix the offsets in processing#46525
vasqu merged 2 commits into
huggingface:mainfrom
zucchini-nlp:fix-processor-offsets

Conversation

@zucchini-nlp

@zucchini-nlp zucchini-nlp commented Jun 9, 2026

Copy link
Copy Markdown
Member

What does this PR do?

Helps vllm to bump v5.10

Before: spans were computed only from the original regex positions, so after the first replacement every image after it became misaligned and new_span was wrong.

Now: we track a running offset that accumulates length changes from each replacement, and use it to adjust spans so every match is mapped correctly into the expanded text

@zucchini-nlp zucchini-nlp added the for patch Tag issues / labels that should be included in the next patch label Jun 9, 2026
@HuggingFaceDocBuilderDev

Copy link
Copy Markdown

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.

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

[For maintainers] Suggested jobs to run (before merge)

run-slow: florence2, fuyu, idefics3

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

CI Dashboard: View test results in Grafana

@ArthurZucker ArthurZucker left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Ty lgtm

@zucchini-nlp zucchini-nlp added this pull request to the merge queue Jun 10, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 10, 2026
@zucchini-nlp zucchini-nlp added this pull request to the merge queue Jun 10, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 10, 2026
@zucchini-nlp zucchini-nlp added this pull request to the merge queue Jun 10, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 10, 2026
@zucchini-nlp zucchini-nlp added this pull request to the merge queue Jun 10, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 10, 2026
@zucchini-nlp zucchini-nlp added this pull request to the merge queue Jun 10, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 10, 2026
@vasqu vasqu merged commit b0a38eb into huggingface:main Jun 10, 2026
119 checks passed
ArthurZucker pushed a commit that referenced this pull request Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

for patch Tag issues / labels that should be included in the next patch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants