ZHO-ZHO-ZHO / ComfyUI-YoloWorld-EfficientSAM

Unofficial implementation of YOLO-World + EfficientSAM for ComfyUI
GNU General Public License v3.0
619 stars 57 forks source link

Error occurred when executing Yoloworld_ESAM_Zho #78

Open mdkid79 opened 4 months ago

mdkid79 commented 4 months ago
1721141907528

Error occurred when executing Yoloworld_ESAM_Zho:

cannot import name 'packaging' from 'pkg_resources' (E:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\pkg_resources__init__.py)

File "E:\ComfyUI_windows_portable\ComfyUI\execution.py", line 151, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\ComfyUI_windows_portable\ComfyUI\execution.py", line 81, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\ComfyUI_windows_portable\ComfyUI\execution.py", line 74, in map_node_over_list results.append(getattr(obj, func)(*slice_dict(input_data_all, i))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-YoloWorld-EfficientSAM\YOLO_WORLD_EfficientSAM.py", line 139, in yoloworld_esam_image YOLO_WORLD_MODEL.set_classes(categories) File "E:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\inference\models\yolo_world\yolo_world.py", line 133, in set_classes self.model.set_classes(text) File "E:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\ultralytics\models\yolo\model.py", line 97, in set_classes self.model.set_classes(classes) File "E:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\ultralytics\nn\tasks.py", line 602, in set_classes import clip File "E:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\clip__init__.py", line 1, in from .clip import File "E:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\clip\clip.py", line 6, in from pkg_resources import packaging

zatevakhin commented 4 months ago

Same issue Ubuntu Linux, Python 3.11.

Error occurred when executing Yoloworld_ESAM_Zho:

cannot import name 'packaging' from 'pkg_resources' (/usr/lib/python3.11/site-packages/pkg_resources/__init__.py)

  File "/home/runner/ComfyUI/execution.py", line 151, in recursive_execute
    output_data, output_ui = get_output_data(obj, input_data_all)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/ComfyUI/execution.py", line 81, in get_output_data
    return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/ComfyUI/execution.py", line 74, in map_node_over_list
    results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/ComfyUI/custom_nodes/ComfyUI-YoloWorld-EfficientSAM/YOLO_WORLD_EfficientSAM.py", line 139, in yoloworld_esam_image
    YOLO_WORLD_MODEL.set_classes(categories)
  File "/home/runner/.local/lib/python3.11/site-packages/inference/models/yolo_world/yolo_world.py", line 133, in set_classes
    self.model.set_classes(text)
  File "/usr/lib/python3.11/site-packages/ultralytics/models/yolo/model.py", line 97, in set_classes
    self.model.set_classes(classes)
  File "/usr/lib/python3.11/site-packages/ultralytics/nn/tasks.py", line 608, in set_classes
    import clip
  File "/home/runner/.local/lib/python3.11/site-packages/clip/__init__.py", line 1, in 
    from .clip import *
  File "/home/runner/.local/lib/python3.11/site-packages/clip/clip.py", line 6, in 
    from pkg_resources import packaging
zatevakhin commented 4 months ago

idk how but solved. did next steps.

image

mdkid79 commented 4 months ago

我不知道怎么做,但解决了。按照后续步骤进行。

  • 从 requirements.txt 安装了 deps(但 deps 已经安装)
  • 重新启动。没有任何变化。
  • 已安装inference-gpu[yolo-world]==0.14.1(遇到包不兼容问题)
  • inference-gpu[yolo-world]==0.9.13再次安装
  • 重新启动 ComfyUI。有效。

图像

you mean "pip install inference-gpu[yolo-world]==0.9.13" ? or other way to install inference-gpu[yolo-world]==0.9.13 ?

zatevakhin commented 4 months ago

@mdkid79 no, just re-installed using pip, pip install inference-gpu[yolo-world]==0.9.13.

It was the same in requirements.txt

mdkid79 commented 4 months ago

@mdkid79 no, just re-installed using pip, pip install inference-gpu[yolo-world]==0.9.13.

It was the same in requirements.txt

OK, I'll try it, thanks

rajeewa47 commented 4 months ago

`Error occurred when executing Yoloworld_ESAM_Zho:

cannot import name 'packaging' from 'pkg_resources' (C:\Ai\ComfyUI_windows_portable\python_embeded\Lib\site-packages\pkg_resources__init__.py)

File "C:\Ai\ComfyUI_windows_portable\ComfyUI\execution.py", line 151, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Ai\ComfyUI_windows_portable\ComfyUI\execution.py", line 81, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Ai\ComfyUI_windows_portable\ComfyUI\execution.py", line 74, in map_node_over_list results.append(getattr(obj, func)(*slice_dict(input_data_all, i))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Ai\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-YoloWorld-EfficientSAM\YOLO_WORLD_EfficientSAM.py", line 139, in yoloworld_esam_image YOLO_WORLD_MODEL.set_classes(categories) File "C:\Ai\ComfyUI_windows_portable\python_embeded\Lib\site-packages\inference\models\yolo_world\yolo_world.py", line 133, in set_classes self.model.set_classes(text) File "C:\Ai\ComfyUI_windows_portable\python_embeded\Lib\site-packages\ultralytics\models\yolo\model.py", line 97, in set_classes self.model.set_classes(classes) File "C:\Ai\ComfyUI_windows_portable\python_embeded\Lib\site-packages\ultralytics\nn\tasks.py", line 608, in set_classes import clip File "C:\Ai\ComfyUI_windows_portable\python_embeded\Lib\site-packages\clip__init__.py", line 1, in from .clip import File "C:\Ai\ComfyUI_windows_portable\python_embeded\Lib\site-packages\clip\clip.py", line 6, in from pkg_resources import packaging`

Same error, anyone have a fix for this?