LayerMask: Object Detector YOLO World(Obsolete)
Object Detector YOLO World — ComfyUI Node Guide
- image
- bboxes
- preview
Read this before you spend time installing: the README marks this node obsolete. It's still in the pack and still functions, but the maintainer pulled its dependencies out of the standard requirements.txt because they caused installation problems, and using it now means manually installing extra packages yourself. If you're picking a node fresh, look at ObjectDetectorFL2 (Florence2-based) or ObjectDetectorYOLO8 elsewhere in this pack first - they cover similar ground without the extra hoops.
If you do want it - maybe you've got an existing workflow built around it, or you specifically need YOLO-World's open-vocabulary detection - here's what it does. YOLO-World is a real, useful idea: normal YOLO models detect a fixed set of trained classes, but YOLO-World can be prompted with arbitrary text and find objects matching that description, similar in spirit to GroundingDINO but built on the YOLO architecture for speed. You describe what you're looking for in plain language, and it returns bounding boxes around matches.
The inputs that matter:
image- your source picture.yolo_world_model- pick from the v2-x/v2-l/v2-m/v2-s and l/m/s size tiers; bigger generally means better detection at the cost of speed.prompt- plain-text description of what to find, defaulting to"subject". This is doing the same job GroundingDINO's text prompt does elsewhere in this pack's masking nodes.confidence_threshold(default 0.05) andnms_iou_threshold(default 0.3) - standard detection tuning: raise confidence to cut false positives, adjust the IoU threshold to control how aggressively overlapping boxes get merged.sort_method- orders multiple detectionsleft_to_right,top_to_bottom,big_to_small, or byconfidence.bbox_select+select_index- once you've got multiple detections, chooseall,first(highest confidence), orby_indexto pick specific ones by number.
Outputs are bboxes (a BBOXES object, the format this pack's other detection and masking nodes expect - feed it straight into DrawBBoxMaskV2 or a SAM2 node to turn boxes into a proper mask) and preview, a visual of the detected boxes overlaid on your image so you can sanity-check what it found before trusting it downstream.
Installing it - the extra step: past the normal pack install (ComfyUI Manager search "ComfyUI Layer Style Advance," or git clone plus install_requirements.bat/pip install -r requirements.txt and repair_dependency.bat), this node specifically needs you to manually run:
pip install inference-cli>=0.13.0
pip install inference-gpu[yolo-world]>=0.13.0
Then grab the model weights from the GoogleDrive or BaiduNetdisk links in the README and copy them into ComfyUI/models/yolo-world.
Why it went obsolete: the README doesn't spell out the exact reason beyond flagging installation problems, but inference-gpu[yolo-world] pulls in its own fairly heavy dependency chain on top of everything else this pack already installs - and this pack's requirements.txt is large to begin with, since it's the half of LayerStyle that was split off specifically to house the nodes with complicated dependencies. Adding one more contentious package on top was apparently enough to tip it over into "do this by hand if you really want it." If you hit import errors specifically tied to inference or yolo_world packages, that's expected - this is the one node in the pack where you're on your own for dependency wrangling rather than relying on repair_dependency.bat to handle it.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| yolo_world_model | COMBO | 7 options: yolo_world/v2-x, yolo_world/v2-l, yolo_world/v2-m, yolo_world/v2-s, yolo_world/l, yolo_world/m, +1 | |
| confidence_threshold | FLOAT | 0.050–1 | — |
| nms_iou_threshold | FLOAT | 0.300–1 | — |
| prompt | STRING | subject | — |
| sort_method | COMBO | 4 options: left_to_right, top_to_bottom, big_to_small, confidence | |
| bbox_select | COMBO | 3 options: all, first, by_index | |
| select_index | STRING | 0, | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| bboxes | BBOXES | — |
| preview | IMAGE | — |