Skip to content

Fix image processors from_dict backward compatibility with old remote code#44245

Merged
yonigozlan merged 3 commits intohuggingface:mainfrom
yonigozlan:fix-phi4-vllm-remote-code
Feb 24, 2026
Merged

Fix image processors from_dict backward compatibility with old remote code#44245
yonigozlan merged 3 commits intohuggingface:mainfrom
yonigozlan:fix-phi4-vllm-remote-code

Conversation

@yonigozlan
Copy link
Member

What does this PR do?

Fix backward compatibility with remote code for old processors not defining valid_kwargs (e.g. phi4)

Cc @zucchini-nlp

Fix test_processor_override for phi3v and phi4 in vllm @hmellor

@yonigozlan yonigozlan force-pushed the fix-phi4-vllm-remote-code branch from eda7228 to 1f0dded Compare February 23, 2026 21:49
@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.

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.

Nice, thanks a lot!

Copy link
Member

Choose a reason for hiding this comment

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

Could we add a warning to let remote code model users know that this is happening?

Also if you were feeling fancy you could iterate over kwargs in reverse and pop them in a single loop

Copy link
Member Author

Choose a reason for hiding this comment

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

Added the warning! And I did feel fancy :)

Copy link
Member

Choose a reason for hiding this comment

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

Oh since we're using list() again I don't think reversed is necessary, since the list is a copy (I think)

@yonigozlan yonigozlan merged commit 5dd090d into huggingface:main Feb 24, 2026
25 checks passed
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.

5 participants