Fix transformers 5.0 import naming#130
Conversation
fix transformers 5.0 import for comfyUI 0.11.1
There was a problem hiding this comment.
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
AutoModelForImageTextToTextinstead of the deprecatedAutoModelForVision2Seq - Updated model instantiation to use the new class name
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Thanks for the PR , the change is small and clear. One compatibility concern before approval: You switched try:
from transformers import AutoModelForImageTextToText as AutoModelForVision2Seq
except ImportError:
from transformers import AutoModelForVision2SeqOnce this is addressed in the PR, I’m happy to approve. |
import supports for both transformers 4.x and 5.x
|
I believe the compatibility concer is resloved now. |
|
Thanks for the update. This branch currently has merge conflicts with |
|
I have resolved the conflicts. Please check if there are any issues. |
fix transformers 5.0 import for comfyUI 0.11.1
Can use standard node rather than only seeing GGUF node