Skip to content

Conversation

@JaredforReal
Copy link
Contributor

What does this PR do?

Upstream transformers upgraded to V5, and GlmImageForConditionalGeneration.get_image_features() won't take return_dict as an explicit arg.
Downstream Caller is recommended to pass return_dict=True and use .pooler_output to adapt to V5 transformers

Fixes # (issue)

Before submitting

Who can review?

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.

Signed-off-by: JaredforReal <w13431838023@gmail.com>
Copilot AI review requested due to automatic review settings January 29, 2026 02:27
@JaredforReal
Copy link
Contributor Author

tested and works fine, @yiyixuxu PTAL, thanks!

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the GLM-Image pipeline to maintain compatibility with transformers V5, which changed the API for GlmImageForConditionalGeneration.get_image_features(). The method no longer accepts return_dict as an explicit parameter, and callers must now access the .pooler_output attribute from the returned object.

Changes:

  • Modified get_image_features() call to remove return_dict=False parameter and access .pooler_output attribute instead
  • Updated image feature extraction for image-to-image mode to work with transformers V5 API

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

1 participant