Fixed incorrect model_type for qwen2vl and qwen2.5vl when config is saved and loaded again#41758
Merged
zucchini-nlp merged 2 commits intohuggingface:mainfrom Oct 21, 2025
Merged
Fixed incorrect model_type for qwen2vl and qwen2.5vl when config is saved and loaded again#41758zucchini-nlp merged 2 commits intohuggingface:mainfrom
zucchini-nlp merged 2 commits intohuggingface:mainfrom
Conversation
Closed
4 tasks
Contributor
|
@ZX-ModelCloud Please verify this. |
Contributor
|
ISSUE#41746 Fixed in this PR. |
Member
zucchini-nlp
left a comment
There was a problem hiding this comment.
Thanks, looks good to me. Can we add a test in
, reproducing the original bug to make sure it is fixed and avoid regressions?
Contributor
Author
|
Do I add it in the existing test_text_config function or make a new one? |
Member
|
Let's add in existing, it's the same regression being tested |
Contributor
|
[For maintainers] Suggested jobs to run (before merge) run-slow: qwen2_5_vl, qwen2_vl |
Contributor
Author
|
I've added the required tests |
|
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. |
ngazagna-qc
pushed a commit
to ngazagna-qc/transformers
that referenced
this pull request
Oct 23, 2025
…aved and loaded again (huggingface#41758) * fixed incorrect model_type for qwen2vl and qwen2.5vl * added tests
i3hz
added a commit
to i3hz/transformers
that referenced
this pull request
Oct 30, 2025
…aved and loaded again (huggingface#41758) * fixed incorrect model_type for qwen2vl and qwen2.5vl * added tests
5 tasks
This was referenced Jan 15, 2026
albertvillanova
pushed a commit
to albertvillanova/transformers
that referenced
this pull request
Jan 15, 2026
…aved and loaded again (huggingface#41758) * fixed incorrect model_type for qwen2vl and qwen2.5vl * added tests
Merged
3 tasks
vasqu
pushed a commit
that referenced
this pull request
Jan 16, 2026
…aved and loaded again (#41758) * fixed incorrect model_type for qwen2vl and qwen2.5vl * added tests
SangbumChoi
pushed a commit
to SangbumChoi/transformers
that referenced
this pull request
Jan 23, 2026
…aved and loaded again (huggingface#41758) * fixed incorrect model_type for qwen2vl and qwen2.5vl * added tests
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?
Fixes the issue where if you save the config and load it again it would return the incorrect model_type .
Minor fix in getattribute method of the config class for both models .
Fixes # 41746
Before submitting
Pull Request section?
to it if that's the case. - When Qwen2VLConfig is saved and loaded again, an incorrect model_type will be obtained #41746
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
@zucchini-nlp
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.