roboflow / inference

A fast, easy-to-use, production-ready inference server for computer vision supporting deployment of many popular model architectures and fine-tuned models.
https://inference.roboflow.com
Other
1.12k stars 84 forks source link

Was not able to run YOLOWorld with inference v0.13.0 #493

Closed singyiu closed 1 week ago

singyiu commented 1 week ago

Search before asking

Bug

Hi team, I simply want to test out YOLOWorld with inference (v0.13.0) according to https://inference.roboflow.com/foundation/yolo_world/ but run into the following issue and would like to report it here:

out of the box, it complained about not having the module clip and ultralytics in YOLOWorld and thrown the following error:

  File "/Users/sing/.local/share/virtualenvs/alldayvision-server-eDnszvrl/lib/python3.11/site-packages/inference/models/yolo_world/__init__.py", line 1, in <module>
    from inference.models.yolo_world.yolo_world import YOLOWorld
  File "/Users/sing/.local/share/virtualenvs/alldayvision-server-eDnszvrl/lib/python3.11/site-packages/inference/models/yolo_world/yolo_world.py", line 5, in <module>
    import clip
ModuleNotFoundError: No module named 'clip'

After installed clip and ultralytics, it thrown the following error upon running infer:

  File "/Users/sing/.local/share/virtualenvs/alldayvision-server-eDnszvrl/lib/python3.11/site-packages/inference/models/yolo_world/yolo_world.py", line 54, in __init__
    clip_model = Clip(model_id="clip/ViT-B-32")
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/sing/.local/share/virtualenvs/alldayvision-server-eDnszvrl/lib/python3.11/site-packages/inference/models/clip/clip_model.py", line 85, in __init__
    self.clip_preprocess = clip.clip._transform(self.resolution)
                           ^^^^^^^^^

Environment

Minimal Reproducible Example

No response

Additional

No response

Are you willing to submit a PR?

yeldarby commented 1 week ago

Inference requirements are modular; the YOLO-World requirements are listed here. We use a modified & optimized CLIP fork.

Try running pip install "inference[yolo-world]"

singyiu commented 1 week ago

Inference requirements are modular; the YOLO-World requirements are listed here. We use a modified & optimized CLIP fork.

Try running pip install "inference[yolo-world]"

Thanks @yeldarby Confirmed that yolo-world is now working correctly after pip install "inference[yolo-world]"