A straightforward node for ComfyUI, the ComfyUI-Yolo-Cropper facilitates the creation of image crops and masks using YoloV8 technology. It is particularly useful for generating square crops needed for applications like controlnets and ip-adapters that require specific input dimensions such as 1024x1024 pixels.
- Utilizes YoloV8 from Ultralytics for object detection, including face detection capabilities.
- Automatically downloads the necessary model files on first use, streamlining the setup process.
- Outputs various formats, including bounding boxes, cropped images, and masks for both original and square crops.
Context
The ComfyUI-Yolo-Cropper is a specialized tool designed to enhance image processing workflows within ComfyUI. Its primary function is to generate precise crops and masks from input images, leveraging advanced object detection techniques to ensure accuracy and versatility in various applications.
Key Features & Benefits
This tool stands out with its ability to detect and crop images based on the COCO 80 object categories, with an additional focus on face detection. The automatic downloading of model files simplifies the initial setup, allowing users to get started quickly without manual intervention. The output options, which include both original and square crops along with corresponding masks, provide flexibility for different project requirements.
Advanced Functionalities
The tool's advanced capabilities include the ability to return the largest bounding box when multiple objects are detected, ensuring that users receive the most relevant crop for their needs. Additionally, the inclusion of face detection enhances its utility for applications where focus on human subjects is critical.
Practical Benefits
By integrating the ComfyUI-Yolo-Cropper into their workflows, users can significantly improve their efficiency and control over image processing tasks. The ability to generate square crops and masks directly from detected objects allows for streamlined operations, particularly when working with systems that require specific input dimensions, ultimately leading to higher quality outputs.
Credits/Acknowledgments
The ComfyUI-Yolo-Cropper is developed by contributors from the open-source community, with primary contributions from the repository owner and collaborators. It utilizes YoloV8 from Ultralytics, and the project is licensed under standard open-source terms, allowing for community use and modification.




