Visit ComfyUI Online for ready-to-use ComfyUI environment
Detects and crops faces from images for AI artists, with advanced algorithms for accurate identification and customization options.
The FC FaceDetectCrop node is designed to detect and crop faces from an input image, providing a focused and enhanced view of the detected face. This node is particularly useful for AI artists who want to isolate facial features for further processing or artistic manipulation. By leveraging advanced face detection algorithms, the node ensures accurate identification and cropping of faces, even in complex images. The node offers flexibility in terms of cropping ratio and mode, allowing you to customize the output to suit your specific needs. Additionally, it can handle scenarios where no face is detected, providing a robust solution for various image processing tasks.
This parameter represents the input image from which the face will be detected and cropped. It should be provided in the IMAGE format.
This integer parameter specifies which face to crop in case multiple faces are detected in the image. The default value is 0, meaning the first detected face will be cropped. The value ranges from 0 to 10, with a step of 1.
This float parameter determines the ratio of the crop area around the detected face. A higher value results in a larger area around the face being included in the crop. The default value is 1.0, with a range from 0 to 10 and a step of 0.1.
This parameter allows you to choose the cropping mode. The available options are "normal" and "square 512 width height". The "normal" mode crops the face as detected, while the "square 512 width height" mode ensures the cropped area is resized to 512x512 pixels.
This boolean parameter controls the behavior when no face is detected in the image. If set to true (enabled), an error will be raised when no face is found. If set to false (disabled), the node will return the original image without any cropping. The default value is false.
This output represents the cropped image containing the detected face. If no face is detected and error_when_no_face
is false, it returns the original image.
This output provides a mask of the cropped area, highlighting the region of the face in the original image. If no face is detected, this will be None.
This output contains the bounding box coordinates of the detected face in the original image. If no face is detected, this will be None.
This output provides the key points of the detected face, such as the positions of the eyes, nose, and mouth. If no face is detected, this will be None.
crop_ratio
parameter to include more or less area around the detected face, depending on your artistic needs.face_index
is out of range.face_index
is within the valid range. If you do not want the node to raise an error when no face is detected, set error_when_no_face
to false.crop_ratio
parameter is set to a value outside the allowed range (0 to 10).crop_ratio
parameter to a value within the valid range.mode
parameter.mode
parameter is set to either "normal" or "square 512 width height".© Copyright 2024 RunComfy. All Rights Reserved.