ZHO-ZHO-ZHO / ComfyUI-YoloWorld-EfficientSAM

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

Fail to download the yolo_world models on macOS #5

Open alessandroperilli opened 9 months ago

alessandroperilli commented 9 months ago

According to #4, I manually pip install inference and succeded to import this custom node suite. However, when I runt the workflow, the node fails to auto-download yolo_world models and return this error:

File "/ComfyUI/execution.py", line 152, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/ComfyUI/execution.py", line 82, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/ComfyUI/execution.py", line 75, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/ComfyUI/custom_nodes/ComfyUI-YoloWorld-EfficientSAM/YOLO_WORLD_EfficientSAM.py", line 70, in load_yolo_world_model YOLO_WORLD_MODEL = YOLOWorld(model_id=yolo_world_model) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/ComfyUI/venv/lib/python3.11/site-packages/inference/models/yolo_world/yolo_world.py", line 36, in init self.model = YOLO(self.cache_file("yolo-world.pt")) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/ComfyUI/venv/lib/python3.11/site-packages/ultralytics/engine/model.py", line 94, in init self._load(model, task) File "/ComfyUI/venv/lib/python3.11/site-packages/ultralytics/engine/model.py", line 146, in _load self.model, self.ckpt = attempt_load_one_weight(weights) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/ComfyUI/venv/lib/python3.11/site-packages/ultralytics/nn/tasks.py", line 628, in attempt_load_one_weight ckpt, weight = torch_safe_load(weight) # load ckpt ^^^^^^^^^^^^^^^^^^^^^^^ File "/ComfyUI/venv/lib/python3.11/site-packages/ultralytics/nn/tasks.py", line 567, in torch_safe_load return torch.load(file, map_location='cpu'), file # load ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/ComfyUI/venv/lib/python3.11/site-packages/torch/serialization.py", line 1025, in load return _load(opened_zipfile, ^^^^^^^^^^^^^^^^^^^^^ File "/ComfyUI/venv/lib/python3.11/site-packages/torch/serialization.py", line 1437, in _load result = unpickler.load() ^^^^^^^^^^^^^^^^ File "/ComfyUI/venv/lib/python3.11/site-packages/torch/serialization.py", line 1430, in find_class return super().find_class(mod_name, name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: Can't get attribute 'WorldModel' on <module 'ultralytics.nn.tasks' from '/ComfyUI/venv/lib/python3.11/site-packages/ultralytics/nn/tasks.py'>

Also, how do yolo_world/l, yolo_world/m, yolo_world/m map to the model files in this directory?

If there's a chance to download and use the extra-large model, I'd love to do that.

109km commented 8 months ago

Same issue here

wien-wyc commented 7 months ago

upgrade your ultralytics to lastest version