Import Failing in Comfy, Python Issue?
Hi I'm getting the following error, any help would be appreciated. Thanks.
Traceback (most recent call last):
File "/notebooks/ComfyUI/nodes.py", line 1931, in load_custom_node
module_spec.loader.exec_module(module)
File "
Cannot import /notebooks/ComfyUI/custom_nodes/was-node-suite-comfyui module for custom nodes: cannot import name 'BlipProcessor' from 'transformers' (/usr/local/lib/python3.11/dist-packages/transformers/init.py)
Wrong version of transformers. Run requirements in WAS NS again.
On Fri, Jul 26, 2024, 11:44 AM dreamlogic-X @.***> wrote:
Hi I'm getting the following error, any help would be appreciated. Thanks.
Traceback (most recent call last): File "/notebooks/ComfyUI/nodes.py", line 1931, in load_custom_node module_spec.loader.exec_module(module) File "", line 940, in exec_module File "", line 241, in _call_with_frames_removed File "/notebooks/ComfyUI/custom_nodes/was-node-suite-comfyui/init.py", line 1, in from .WAS_Node_Suite import NODE_CLASS_MAPPINGS File "/notebooks/ComfyUI/custom_nodes/was-node-suite-comfyui/WAS_Node_Suite.py", line 2412, in from transformers import BlipProcessor, BlipForConditionalGeneration, BlipForQuestionAnswering ImportError: cannot import name 'BlipProcessor' from 'transformers' (/usr/local/lib/python3.11/dist-packages/transformers/init.py)
Cannot import /notebooks/ComfyUI/custom_nodes/was-node-suite-comfyui module for custom nodes: cannot import name 'BlipProcessor' from 'transformers' (/usr/local/lib/python3.11/dist-packages/transformers/ init.py)
— Reply to this email directly, view it on GitHub https://github.com/WASasquatch/was-node-suite-comfyui/issues/446, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIZEZNGOC4V5Q52RWSO5YTZOKKILAVCNFSM6AAAAABLRAGUVGVHI2DSMVQWIX3LMV43ASLTON2WKOZSGQZTENZZGM2DOMI . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Wrong version of transformers. Run requirements in WAS NS again. … On Fri, Jul 26, 2024, 11:44 AM dreamlogic-X @.> wrote: Hi I'm getting the following error, any help would be appreciated. Thanks. ------------------------------ Traceback (most recent call last): File "/notebooks/ComfyUI/nodes.py", line 1931, in load_custom_node module_spec.loader.exec_module(module) File "", line 940, in exec_module File "", line 241, in _call_with_frames_removed File "/notebooks/ComfyUI/custom_nodes/was-node-suite-comfyui/init.py", line 1, in from .WAS_Node_Suite import NODE_CLASS_MAPPINGS File "/notebooks/ComfyUI/custom_nodes/was-node-suite-comfyui/WAS_Node_Suite.py", line 2412, in from transformers import BlipProcessor, BlipForConditionalGeneration, BlipForQuestionAnswering ImportError: cannot import name 'BlipProcessor' from 'transformers' (/usr/local/lib/python3.11/dist-packages/transformers/init.py) Cannot import /notebooks/ComfyUI/custom_nodes/was-node-suite-comfyui module for custom nodes: cannot import name 'BlipProcessor' from 'transformers' (/usr/local/lib/python3.11/dist-packages/transformers/ init.py) — Reply to this email directly, view it on GitHub <#446>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIZEZNGOC4V5Q52RWSO5YTZOKKILAVCNFSM6AAAAABLRAGUVGVHI2DSMVQWIX3LMV43ASLTON2WKOZSGQZTENZZGM2DOMI . You are receiving this because you are subscribed to this thread.Message ID: @.>
Im getting this same issue.. the requirements.txt doesn't call a specific version so by default it will install the latest, pip list on my machine shows transformers 4.35.2
Anyway to fix this , i use WAS for other things than blip but this issue broke my comfy recently..
Unless they inexplicably removed BLIP from transformers that's odd. I have a higher version now testing from source and BLIP still works. Is it possible you installed to your systems modules and not ComfyUI 's venv?
Unless they inexplicably removed BLIP from transformers that's odd. I have a higher version now testing from source and BLIP still works. Is it possible you installed to your systems modules and not ComfyUI 's venv?
Thanks for getting back to me, in my venv I can also run pip install commands..
It looks like this since some of the custom nodes fail at times even though the comfy is supposed to run the requirements.txt you can see this here
Manager, a custom node will attempt to run custom node requirements during the installation process or a custom node, but it's not guaranteed. Probably more so on environments that are nonstandard like a notebook on Colab, or Kaggle or something. I can imagine the systems may have some limitations requiring more manual installations. I know when I spent all my time on Colab back with Disco Diffusion, and when Stable Diffusion released, I often had to come up with new ways to get things to work. Sometimes even ripping out code from larger packages that would t install.
Where are you running this?
Manager, a custom node will attempt to run custom node requirements during the installation process or a custom node, but it's not guaranteed. Probably more so on environments that are nonstandard like a notebook on Colab, or Kaggle or something. I can imagine the systems may have some limitations requiring more manual installations. I know when I spent all my time on Colab back with Disco Diffusion, and when Stable Diffusion released, I often had to come up with new ways to get things to work. Sometimes even ripping out code from larger packages that would t install.
Where are you running this?
I run this on paperspace, yea i get you back in the disco days i was there right with you.. im just confused now why the hell this would happen, I have a programmer background and also linux background so I know my way around these boxes..
added a pip show to see what it was running when i was on the last cell .. not sure if thats the best way to see it but
@WASasquatch I added this line and it fixed it all
!pip install "transformers>=4.39.0"
so freaking annoying, i figured w/o the version it would just install the latest..