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

CogVideoXWrapper Import failed #317

Open
ebelharw opened this issue Dec 10, 2024 · 1 comment
Open

CogVideoXWrapper Import failed #317

ebelharw opened this issue Dec 10, 2024 · 1 comment

Comments

@ebelharw
Copy link

Hi! I'm having trouble importing CogVideoXWrapper, it's giving me (IMPORT FAILED) in the Manager and "Try Fix" doesn't seem to do anything. I'm still pretty new to all this so I'm not sure what to make of this error in the log, any insight would be greatly appreciated:

File "C:\Users\webelhar\Desktop\ComfyUI_windows_portable\python_embeded\Lib\site-packages\diffusers\utils\import_utils.py", line 855, in _get_module
    raise RuntimeError(
RuntimeError: Failed to import diffusers.loaders.unet because of the following error (look up to see its traceback):
cannot import name 'EncoderDecoderCache' from 'transformers' (C:\Users\webelhar\Desktop\ComfyUI_windows_portable\python_embeded\Lib\site-packages\transformers\__init__.py)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\webelhar\Desktop\ComfyUI_windows_portable\ComfyUI\nodes.py", line 2035, in load_custom_node
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Users\webelhar\Desktop\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-CogVideoXWrapper\__init__.py", line 2, in <module>
    from .model_loading import NODE_CLASS_MAPPINGS as MODEL_CLASS, NODE_DISPLAY_NAME_MAPPINGS as MODEL_DISPLAY
  File "C:\Users\webelhar\Desktop\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-CogVideoXWrapper\model_loading.py", line 40, in <module>
    from diffusers.models import AutoencoderKLCogVideoX
  File "<frozen importlib._bootstrap>", line 1229, in _handle_fromlist
  File "C:\Users\webelhar\Desktop\ComfyUI_windows_portable\python_embeded\Lib\site-packages\diffusers\utils\import_utils.py", line 843, in __getattr__
    module = self._get_module(self._class_to_module[name])
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\webelhar\Desktop\ComfyUI_windows_portable\python_embeded\Lib\site-packages\diffusers\utils\import_utils.py", line 855, in _get_module
    raise RuntimeError(
RuntimeError: Failed to import diffusers.models.autoencoders.autoencoder_kl_cogvideox because of the following error (look up to see its traceback):
Failed to import diffusers.loaders.unet because of the following error (look up to see its traceback):
cannot import name 'EncoderDecoderCache' from 'transformers' (C:\Users\webelhar\Desktop\ComfyUI_windows_portable\python_embeded\Lib\site-packages\transformers\__init__.py)

Cannot import C:\Users\webelhar\Desktop\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-CogVideoXWrapper module for custom nodes: Failed to import diffusers.models.autoencoders.autoencoder_kl_cogvideox because of the following error (look up to see its traceback):
Failed to import diffusers.loaders.unet because of the following error (look up to see its traceback):
cannot import name 'EncoderDecoderCache' from 'transformers' (C:\Users\webelhar\Desktop\ComfyUI_windows_portable\python_embeded\Lib\site-packages\transformers\__init__.py)

Thanks for your time!

@kijai
Copy link
Owner

kijai commented Dec 11, 2024

Looks like transformers version error, should try updating that, at least for me the nodes import with the latest version fine.

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

2 participants