Save 4 hours! We auto-setup your workflow! Free!

Drop your workflow.json — we handle every dependency, custom node, and model. Just open the link and run.

Auto-Setup Workflow Json (Free) Now!
ComfyUI > Nodes > ComfyUI-YoloWorld-EfficientSAM

ComfyUI Extension: ComfyUI-YoloWorld-EfficientSAM

Repo Name

ComfyUI-YoloWorld-EfficientSAM

Author
zho-zho-zho (Account age: 1213 days)
Nodes
View all nodes(1)
Latest Updated
2024-05-22
Github Stars
0.83K

How to Install ComfyUI-YoloWorld-EfficientSAM

Install this extension via the ComfyUI Manager by searching for ComfyUI-YoloWorld-EfficientSAM
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-YoloWorld-EfficientSAM in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

ComfyUI-YoloWorld-EfficientSAM Description

ComfyUI-YoloWorld-EfficientSAM combines YOLO-World object detection with EfficientSAM segmentation to find named objects in images or video and produce separate, combined, or selected object masks.

ComfyUI-YoloWorld-EfficientSAM Introduction

ComfyUI-YoloWorld-EfficientSAM is an unofficial ComfyUI extension that combines YOLO-World object detection with EfficientSAM segmentation. You describe the objects you want to find, and the extension can locate them in an image and create masks around them.

A detection box shows roughly where an object is. A mask marks the image area belonging to that object more precisely. Masks are useful when you want to work with one subject or region separately, such as selecting a person while leaving the background alone. The provided workflows demonstrate both image and video detection and segmentation.

Version 2.0 adds ways to keep masks separate, combine them, or extract one selected mask. This makes it easier to choose the output that fits your next step in ComfyUI.

Example of the extension

How ComfyUI-YoloWorld-EfficientSAM Works

Think of the two models as doing different jobs:

  1. YOLO-World finds candidates. You enter object names in categories, and YOLO-World looks for matching objects. It reports their approximate locations as boxes.
  2. EfficientSAM traces the selected areas. When with_segmentation is enabled, EfficientSAM uses those detections to produce object masks.
  3. You choose how to use the results. You can display detection labels and boxes, combine all masks, keep masks separate, or extract a mask by its index.

For example, if your image contains several objects and you want a mask for just one of them, first inspect the detections and masks. Then enable mask_extracted and choose the corresponding mask_extracted_index. The index selects an output mask; it does not tell the detector which object to find.

The controls for confidence and overlap help you refine detection. If too many unrelated objects are marked, raising confidence_threshold can filter out weaker detections. If overlapping boxes are causing confusion, adjusting iou_threshold or enabling class-agnostic suppression may help.

Detection and segmentation example

ComfyUI-YoloWorld-EfficientSAM Features

Model loaders

  • 🔎Yoloworld Model Loader: Selects and loads one of the three supported official YOLO-World model sizes: yolo_world/l, yolo_world/m, or yolo_world/s. The loader automatically downloads and loads the selected YOLO-World model.
  • 🔎ESAM Model Loader: Loads EfficientSAM and lets you choose CUDA or CPU. CUDA is the GPU option; CPU is the alternative when you are not using CUDA.

🔎Yoloworld ESAM

This is the main detection and segmentation node. Its inputs and settings let you control what is found and what is displayed:

SettingWhat it doesWhen you might change it
yolo_world_modelConnects the YOLO-World model loader.Choose the detection model you want to use.
esam_modelConnects the EfficientSAM model loader.Supply the model used to make masks.
imageSupplies the image to process.Connect the image from your workflow.
categoriesSpecifies the objects to detect and segment.Change the object names to match your subject.
confidence_thresholdSets how confident a detection must be to appear.Lower it if desired objects are missed; raise it if you see too many false detections.
iou_thresholdControls how much detected boxes may overlap.Lower it for stricter overlap handling; raise it to allow more overlapping boxes.
box_thicknessChanges the visible detection-box line width.Increase it when boxes are hard to see.
text_thicknessChanges the visible label line weight.Adjust it to make labels easier to read.
text_scaleChanges the visible label size.Increase it if labels look too small.
with_confidenceShows or hides confidence values beside detected objects.Show them when evaluating detections; hide them for a simpler preview.
with_class_agnostic_nmsSuppresses overlapping boxes across different categories.Try it when several category labels produce competing boxes over the same area.
with_segmentationTurns EfficientSAM instance segmentation on or off.Enable it when you need masks, not just detections.
mask_combinedCombines all masks into one output when enabled; otherwise outputs masks separately.Combine masks to work with all detected areas together, or keep them separate to work on individual objects.
mask_extractedEnables output of one selected mask.Turn it on when you need a particular detected instance.
mask_extracted_indexSelects which mask to extract.Change the index after checking which output mask corresponds to your intended object.

Settings such as box_thickness and text_scale affect the displayed detection markings, while the threshold and mask settings affect which detections or masks you work with.

Yoloworld ESAM node settings

🔎Yoloworld ESAM Detector Provider

The Detector Provider node, contributed by ltdrdata, is intended for use with Impact-Pack. It takes yolo_world_model and esam_model connections and offers categories, iou_threshold, and with_class_agnostic_nms controls. Use it when your workflow needs this detector-provider connection rather than the main node’s direct outputs.

Detector Provider example

ComfyUI-YoloWorld-EfficientSAM Models

The YOLO-World loader supports three official model sizes:

ModelPractical choice
yolo_world/sThe small option to try when you want a lighter model.
yolo_world/mThe middle option when you want to compare against the small and large models.
yolo_world/lThe large option to try when you can accommodate a heavier model.

Model size can affect resource use and the detections you get. The original documentation does not provide speed or accuracy benchmarks, so compare the models on your own images rather than assuming one will always give the best result.

EfficientSAM supplies the segmentation stage. The ESAM loader offers CUDA and CPU operation. The original documentation identifies efficient_sam_s_gpu.jit and efficient_sam_s_cpu.jit as its corresponding model files. Choose the option that matches the processing hardware available to your ComfyUI setup.

What's New with ComfyUI-YoloWorld-EfficientSAM

  • February 24, 2024 — V2.0: Added separate-mask output and extraction of a selected mask by index, for image and video workflows. This helps you work with an individual detected object instead of treating every mask as one selection. V1.0 workflows are not compatible with V2.0.
  • February 21, 2024 — Detector Provider: Added the 🔎Yoloworld ESAM Detector Provider node contributed by ltdrdata, allowing use with Impact-Pack workflows.
  • February 20, 2024 — V1.0: The initial release supported image and video detection and segmentation, including mask output.

Troubleshooting ComfyUI-YoloWorld-EfficientSAM

The workflow does not work after moving to V2.0.

  1. Check whether you loaded a V1.0 example workflow.
  2. Open the corresponding V2.0 image workflow or V2.0 video workflow instead.
  3. Reconnect your image or video source and review the model and mask settings. The author explicitly notes that V1.0 workflows do not apply to V2.0.

The object I want is missing, or unrelated objects are detected.

  1. Check that categories describes the object you want to find.
  2. If the object is missed, try lowering confidence_threshold.
  3. If unrelated objects appear, try raising confidence_threshold.
  4. Compare the YOLO-World model sizes on the same image if the result still does not meet your needs.

I see detections but no useful masks.

  1. Confirm that esam_model is connected.
  2. Turn on with_segmentation.
  3. Check the detections first: EfficientSAM needs a detected object to segment.
  4. Review mask_combined and mask_extracted to make sure you are looking at the intended type of mask output.

The extracted mask is not the object I wanted.

  1. Temporarily inspect the separate masks with mask_combined off.
  2. Identify which mask corresponds to your subject.
  3. Enable mask_extracted and change mask_extracted_index to select it. Recheck the choice when the detections or input image change.

Several boxes appear over the same subject.

  1. Try adjusting iou_threshold to change overlap handling.
  2. Try with_class_agnostic_nms when boxes from different categories compete over the same area.
  3. Check the preview after each change so you can see which setting helps.

Frequently asked questions

Do I need segmentation to find objects?
No. YOLO-World provides object detection. Turn on with_segmentation when you also need masks around detected objects.

What is the difference between a combined mask and separate masks?
A combined mask places the detected areas together in one output. Separate masks let you work with detected instances individually.

Can I use this extension with video?
The author provides a V2.0 video detection and segmentation workflow. Start with that example to see how the nodes are connected.

Should I choose CPU or CUDA for EfficientSAM?
Choose CUDA when your ComfyUI setup supports that option; otherwise use CPU. The model loader offers both.

Where can I see the extension in action?
Watch the V2.0 demonstration video. An older V1.0 demonstration is also available, but its workflow is not compatible with V2.0.

Learn More about ComfyUI-YoloWorld-EfficientSAM

ComfyUI-YoloWorld-EfficientSAM Related Nodes

RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

ComfyUI-YoloWorld-EfficientSAM detailed guide | ComfyUI