Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An error is reported after the update,cannot import name 'sd2_clip' from 'comfy' #272

Open
grinlau18 opened this issue Jul 28, 2024 · 13 comments

Comments

@grinlau18
Copy link

Hello author, when I fully updated comfyui, the node reported the following error when it was started again, resulting in the failure to load the easy use node after entering the operation interface.

Pls how to fix it, thanks!

Traceback (most recent call last):
File "/root/autodl-tmp/ComfyUI/nodes.py", line 1931, in load_custom_node
module_spec.loader.exec_module(module)
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/root/autodl-tmp/ComfyUI/custom_nodes/ComfyUI-Easy-Use/init.py", line 20, in
imported_module = importlib.import_module(".py.{}".format(module_name), name)
File "/root/miniconda3/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/root/autodl-tmp/ComfyUI/custom_nodes/ComfyUI-Easy-Use/py/easyNodes.py", line 1661, in
from .dynamiCrafter import DynamiCrafter
File "/root/autodl-tmp/ComfyUI/custom_nodes/ComfyUI-Easy-Use/py/dynamiCrafter/init.py", line 11, in
from .utils.model_utils import DynamiCrafterBase, DYNAMICRAFTER_CONFIG, load_image_proj_dict, load_dynamicrafter_dict, get_image_proj_model
File "/root/autodl-tmp/ComfyUI/custom_nodes/ComfyUI-Easy-Use/py/dynamiCrafter/utils/model_utils.py", line 10, in
from comfy import sd2_clip
ImportError: cannot import name 'sd2_clip' from 'comfy' (unknown location)

Cannot import /root/autodl-tmp/ComfyUI/custom_nodes/ComfyUI-Easy-Use module for custom nodes: cannot import name 'sd2_clip' from 'comfy' (unknown location)

@luze1011
Copy link

I also encountered the same problem

@luze1011
Copy link

I tried reinstalling the Comfy module, but to no avail

@gisu
Copy link

gisu commented Jul 28, 2024

Same here. Tested with a fresh ComfyUI Installation, Easy Use import failed

@bruibbruib
Copy link

bruibbruib commented Jul 28, 2024

Same here.
Temp fix, (that may break things???):
copy 'sd2_clip.py' from 'encoders' folder, to 'comfy' folder, one level up.
mine is working now.
good luck!

@alexnikospb
Copy link

Yes, I have the same problem, Easy Use import failed

AlUlkesh added a commit to AlUlkesh/ComfyUI-Easy-Use that referenced this issue Jul 28, 2024
Backwards compatible fix for change in ComfyUi:
comfyanonymous/ComfyUI@4ba7fa0
@AlUlkesh
Copy link
Contributor

It's this change in ComfyUI that caused this:
comfyanonymous/ComfyUI@4ba7fa0

This PR should fix that...

@aurelienLavanchy
Copy link

Same here. Temp fix, (that may break things???): copy 'sd2_clip.py' from 'encoders' folder, to 'comfy' folder, one level up. mine is working now. good luck!

Rather than copying the file, you can make a symbolic link while we wait for a fix

@moddz
Copy link

moddz commented Jul 28, 2024

same issue

@pandayummy
Copy link

+1 pls fix it.
thannnnnnk you!

@yolain
Copy link
Owner

yolain commented Jul 28, 2024

It's this change in ComfyUI that caused this: comfyanonymous/ComfyUI@4ba7fa0

This PR should fix that...

❤️ Thanks to fixed it. It's the weekend and I've only just seen this issue.

@AugmentedRealityCat
Copy link

I had to uninstall ComfyUI-Easy-Use and reinstall it to fix the problem by the way. Simply using the "try to fix the problem" from the Manager's interface was not enough in my case.

@Walfy-sjl
Copy link

just adjust some code, like below, it works for me. (just like the link show)
comfyanonymous/ComfyUI@4ba7fa0

from comfy import sd2_clip
from comfy.text_encoders import sd2_clip

@anseltrust
Copy link

Is there a solution for this, still not working.

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

No branches or pull requests