Skip to content

Fix some processors - #47608

Merged
zucchini-nlp merged 2 commits into
huggingface:mainfrom
zucchini-nlp:fix-ci-processing
Jul 29, 2026
Merged

Fix some processors#47608
zucchini-nlp merged 2 commits into
huggingface:mainfrom
zucchini-nlp:fix-ci-processing

Conversation

@zucchini-nlp

@zucchini-nlp zucchini-nlp commented Jul 28, 2026

Copy link
Copy Markdown
Member

CI

What does this PR do?

Daily CI complained after I merged VLM processors' update, fixing it

Comment on lines -49 to +50
self.image_token = tokenizer.image_token if hasattr(tokenizer, "image_token") else image_token
self.image_token_id = (
tokenizer.image_token_id
if getattr(tokenizer, "image_token_id", None)
else tokenizer.convert_tokens_to_ids(self.image_token)
)
self.image_token = "<image>"
self.image_token_id = tokenizer.convert_tokens_to_ids(self.image_token)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

model has saved <IMG_ATOM> as image token, i.e. the token used by model. We should actually have the same image token in processing and in modeling, but I missed this in ovis when releasing

This not perfect hardcoded value allows us to actually expand image placeholders

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.

Looks like it breaks fast ci?

@zucchini-nlp

Copy link
Copy Markdown
Member Author

run-slow: florence2, ovis2

@github-actions

Copy link
Copy Markdown
Contributor

Workflow Run ⚙️

This comment contains run-slow, running the specified jobs:

models: ["models/florence2", "models/ovis2"]
quantizations: []

@github-actions

Copy link
Copy Markdown
Contributor

CI recap

Dashboard: View test results in Grafana
Latest run: 30363686468
Result: failure | Grafana metrics are not available yet.

@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

Copy link
Copy Markdown
Contributor

CI Results

Workflow Run ⚙️

Commit Info

Context Commit Description
RUN 1f424d1b workflow commit (merge commit)
PR 8f38b578 branch commit (from PR)
main ff24c90c base commit (on main)

Model CI Report

2 new failed tests from this PR 😭

  • florence2:
    tests/models/florence2/test_modeling_florence2.py::Florence2ForConditionalGenerationIntegrationTest::test_large_model_inference_eager (❌ ⟹ ❌)

  • ovis2:
    tests/models/ovis2/test_modeling_ovis2.py::Ovis2IntegrationTest::test_small_model_integration_test_batch_different_resolutions (❌ ⟹ ❌)

@zucchini-nlp

Copy link
Copy Markdown
Member Author

These two tests were failing already before I broke processing, so I didn't fix them (out of scope for this PR)

@zucchini-nlp
zucchini-nlp requested a review from vasqu July 28, 2026 14:14

@vasqu vasqu 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.

Thanks let's fix fast CI please 🤗

Comment on lines -49 to +50
self.image_token = tokenizer.image_token if hasattr(tokenizer, "image_token") else image_token
self.image_token_id = (
tokenizer.image_token_id
if getattr(tokenizer, "image_token_id", None)
else tokenizer.convert_tokens_to_ids(self.image_token)
)
self.image_token = "<image>"
self.image_token_id = tokenizer.convert_tokens_to_ids(self.image_token)

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.

Looks like it breaks fast ci?

@zucchini-nlp

Copy link
Copy Markdown
Member Author

Looks like it breaks fast ci?

oh no, this is why we need to be stricter with token id values. Lemme see if it's breaking, maybe I will just override get_text_with_replacement if so

@zucchini-nlp
zucchini-nlp enabled auto-merge July 29, 2026 10:11
@github-actions

Copy link
Copy Markdown
Contributor

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

run-slow: florence2, ovis2

@zucchini-nlp
zucchini-nlp added this pull request to the merge queue Jul 29, 2026
Merged via the queue into huggingface:main with commit dfff6dc Jul 29, 2026
29 checks passed
@zucchini-nlp
zucchini-nlp deleted the fix-ci-processing branch July 29, 2026 10:23
stevhliu pushed a commit to stevhliu/transformers that referenced this pull request Jul 30, 2026
* fix

* oke, this was a mismtach between values in testing and processor files
Sainava pushed a commit to Sainava/Sai-transformers that referenced this pull request Aug 3, 2026
* fix

* oke, this was a mismtach between values in testing and processor files
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