ZHO-ZHO-ZHO / ComfyUI-YoloWorld-EfficientSAM

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

ImportError: cannot import name 'YOLOWorld' from 'inference.models' #63

Open g-wellsa opened 5 months ago

g-wellsa commented 5 months ago

Traceback (most recent call last): File "G:\workspace\python\ComfyUI_nvidia_cu121_or_cpu\ComfyUI\nodes.py", line 1879, 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 "G:\workspace\python\ComfyUI_nvidia_cu121_or_cpu\ComfyUI\custom_nodes\ComfyUI-YoloWorld-EfficientSAM__init.py", line 1, in from . import YOLO_WORLD_EfficientSAM File "G:\workspace\python\ComfyUI_nvidia_cu121_or_cpu\ComfyUI\custom_nodes\ComfyUI-YoloWorld-EfficientSAM\YOLO_WORLD_EfficientSAM.py", line 9, in from inference.models import YOLOWorld ImportError: cannot import name 'YOLOWorld' from 'inference.models' (G:\workspace\python\ComfyUI_nvidia_cu121_or_cpu\python_embeded\Lib\site-packages\inference\models\init__.py)

Cannot import G:\workspace\python\ComfyUI_nvidia_cu121_or_cpu\ComfyUI\custom_nodes\ComfyUI-YoloWorld-EfficientSAM module for custom nodes: cannot import name 'YOLOWorld' from 'inference.models' (G:\workspace\python\ComfyUI_nvidia_cu121_or_cpu\python_embeded\Lib\site-packages\inference\models__init__.py)

g-wellsa commented 5 months ago

有人遇到这种问题吗,求解

Un1ess commented 5 months ago

遇到问题+1

Cokeheart commented 5 months ago

I have the same problem. Is there a way to solve it?

g-wellsa commented 5 months ago

No~~~

isa988 @.***

 

------------------ 原始邮件 ------------------ 发件人: "ZHO-ZHO-ZHO/ComfyUI-YoloWorld-EfficientSAM" @.>; 发送时间: 2024年6月29日(星期六) 下午5:06 @.>; @.**@.>; 主题: Re: [ZHO-ZHO-ZHO/ComfyUI-YoloWorld-EfficientSAM] ImportError: cannot import name 'YOLOWorld' from 'inference.models' (Issue #63)

I have the same problem. Is there a way to solve it?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

AntAreS24 commented 4 months ago

I found a way to get this up and running on MacOS M3.

  1. Check if onnxruntime-gpu is installed. If yes, remove it:
    cd custom_nodes/ComfyUI-YoloWorld-EfficientSAM
    pip3 list | grep onnxruntime-gpu
    pip3 uninstall onnxruntime-gpu
  2. Change the following dependency in the custom_nodes/ComfyUI-YoloWorld-EfficientSAM project requirements.txt
    # remove inference-gpu[yolo-world]==0.9.13
    inference[yolo-world]==0.9.13
  3. Then reinstall the dependencies
    pip install -r requirements.txt