Skip to content

Fix transformers 5.0 import naming#130

Open
Sepolian wants to merge 3 commits into1038lab:mainfrom
Sepolian:main
Open

Fix transformers 5.0 import naming#130
Sepolian wants to merge 3 commits into1038lab:mainfrom
Sepolian:main

Conversation

@Sepolian
Copy link
Copy Markdown

fix transformers 5.0 import for comfyUI 0.11.1
Can use standard node rather than only seeing GGUF node

fix transformers 5.0 import for comfyUI 0.11.1
Copilot AI review requested due to automatic review settings January 31, 2026 07:51
Copy link
Copy Markdown

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 transformers library imports and usage to be compatible with transformers 5.0, allowing ComfyUI-QwenVL nodes to work properly with ComfyUI 0.11.1 instead of only showing GGUF nodes.

Changes:

  • Updated import statement to use AutoModelForImageTextToText instead of the deprecated AutoModelForVision2Seq
  • Updated model instantiation to use the new class name

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

@LFd3v LFd3v mentioned this pull request Feb 2, 2026
@1038lab
Copy link
Copy Markdown
Owner

1038lab commented Feb 5, 2026

Thanks for the PR , the change is small and clear. One compatibility concern before approval:

You switched AutoModelForVision2SeqAutoModelForImageTextToText, which is correct for transformers 5.0 but will fail on 4.x. Since this repo supports both transformers 4.x and 5.x, please add a simple fallback:

try:
    from transformers import AutoModelForImageTextToText as AutoModelForVision2Seq
except ImportError:
    from transformers import AutoModelForVision2Seq

Once this is addressed in the PR, I’m happy to approve.

import supports for both transformers 4.x and 5.x
@Sepolian
Copy link
Copy Markdown
Author

Sepolian commented Feb 7, 2026

I believe the compatibility concer is resloved now.
Thank you for pointing that out.

@1038lab
Copy link
Copy Markdown
Owner

1038lab commented Feb 7, 2026

Thanks for the update.

This branch currently has merge conflicts with main.
Please resolve the conflicts and update the PR so we can proceed with the review and merge.

@Sepolian
Copy link
Copy Markdown
Author

I have resolved the conflicts. Please check if there are any issues.

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