Skip to content

[Bug] Crash on startup due to ImportError from transformers library #497

@dpapperini

Description

@dpapperini

Hi, the custom node fails to load and causes an error on ComfyUI startup, likely due to an incompatibility with a recent version of the transformers library.

Full Traceback

[ComfyUI] Traceback (most recent call last):
[ComfyUI] File "/src/ComfyUI/nodes.py", line 2124, in load_custom_node
[ComfyUI] module_spec.loader.exec_module(module)
[ComfyUI] File "<frozen importlib._bootstrap_external>", line 999, in exec_module
[ComfyUI] File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
[ComfyUI] File "/src/ComfyUI/custom_nodes/ComfyUI-HunyuanVideoWrapper/__init__.py", line 1, in <module>
[ComfyUI] from .nodes import NODE_CLASS_MAPPINGS as NODES_CLASS, NODE_DISPLAY_NAME_MAPPINGS as NODES_DISPLAY
[ComfyUI] File "/src/ComfyUI/custom_nodes/ComfyUI-HunyuanVideoWrapper/nodes.py", line 11, in <module>
[ComfyUI] from .hyvideo.text_encoder import TextEncoder
[ComfyUI] File "/src/ComfyUI/custom_nodes/ComfyUI-HunyuanVideoWrapper/hyvideo/text_encoder/__init__.py", line 9, in <module>
[ComfyUI] from .processing_llava import LlavaProcessor
[ComfyUI] File "/src/ComfyUI/custom_nodes/ComfyUI-HunyuanVideoWrapper/hyvideo/text_encoder/processing_llava.py", line 23, in <module>
[ComfyUI] from transformers.processing_utils import ProcessingKwargs, ProcessorMixin, Unpack, _validate_images_text_input_order
[ComfyUI] ImportError: cannot import name '_validate_images_text_input_order' from 'transformers.processing_utils' (/root/.pyenv/versions/3.12.11/lib/python3.12/site-packages/transformers/processing_utils.py)
[ComfyUI] Cannot import /src/ComfyUI/custom_nodes/ComfyUI-HunyuanVideoWrapper module for custom nodes: cannot import name '_validate_images_text_input_order' from 'transformers.processing_utils' (/root/.pyenv/versions/3.12.11/lib/python3.12/site-packages/transformers/processing_utils.py)

Environment

Please provide the following information to help diagnose the issue:

  • OS: Ubuntu 22.04
  • Python Version: 3.12.11
  • Transformers Version: 4.54.1
  • PyTorch Version: 2.5.1+cu121
  • xformers Version: 0.0.29.post1
  • CUDA Version: 12.1
  • Device Version: NVIDIA GeForce RTX 3070
  • ComfyUI Version: 0.3.46 Last Commit 5d4cc3ba1b412b9acacd37fd23d59e0e1654f83c
  • ComfyUI-HunyuanVideoWrapper Version: Last Commit 3ce9640497139b14462910b0dbf2be1df855c1d6

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions