ComfyUI  >  Nodes  >  ComfyUI-Portrait-Maker >  RetinaFace PM

ComfyUI Node: RetinaFace PM

Class Name

PM_RetinaFace

Category
protrait/model
Author
THtianhao (Account age: 3700 days)
Extension
ComfyUI-Portrait-Maker
Latest Updated
5/22/2024
Github Stars
0.2K

How to Install ComfyUI-Portrait-Maker

Install this extension via the ComfyUI Manager by searching for  ComfyUI-Portrait-Maker
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-Portrait-Maker 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
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

RetinaFace PM Description

Specialized node for detecting and cropping faces using RetinaFace algorithm, essential for AI artists enhancing portraits.

RetinaFace PM:

PM_RetinaFace is a specialized node designed to detect and crop faces from images using the RetinaFace algorithm. This node is particularly useful for AI artists who need to isolate faces from images for further processing, such as portrait enhancement or facial feature analysis. By leveraging advanced face detection techniques, PM_RetinaFace ensures accurate and efficient face cropping, making it easier to focus on specific facial regions. The node not only crops the face but also provides a mask and bounding box, which can be used for various artistic and analytical purposes. This functionality is essential for creating high-quality portraits and ensuring that facial features are accurately represented in your artwork.

RetinaFace PM Input Parameters:

image

This parameter expects an image input from which faces will be detected and cropped. The image should be in a format that the node can process, typically a tensor representation of the image.

multi_user_facecrop_ratio

This parameter controls the cropping ratio around the detected face. It allows you to adjust how much of the surrounding area is included in the crop. The value can range from 0 to 10, with a default of 1. A higher value includes more of the surrounding area, while a lower value focuses more closely on the face.

face_index

This parameter specifies which face to crop in case multiple faces are detected in the image. It is an integer value ranging from 0 to 10, with a default of 0. The index corresponds to the order in which faces are detected, allowing you to select a specific face for cropping.

RetinaFace PM Output Parameters:

crop_image

This output is the cropped image of the detected face. It is an image tensor that contains only the face region as specified by the face_index and multi_user_facecrop_ratio parameters.

crop_mask

This output is a mask of the cropped face region. The mask highlights the area of the face within the cropped image, which can be useful for further image processing tasks such as segmentation or blending.

crop_box

This output is the bounding box of the cropped face. It provides the coordinates of the face region within the original image, which can be used for reference or additional processing steps.

RetinaFace PM Usage Tips:

  • Adjust the multi_user_facecrop_ratio to include more or less of the surrounding area around the face, depending on your artistic needs.
  • Use the face_index parameter to select specific faces in images with multiple people, ensuring you crop the correct face for your project.
  • Combine the crop_image and crop_mask outputs to perform advanced image editing tasks, such as applying filters or effects only to the face region.

RetinaFace PM Common Errors and Solutions:

"No faces detected in the image"

  • Explanation: This error occurs when the node is unable to detect any faces in the provided image.
  • Solution: Ensure that the image contains clear and visible faces. You may also try adjusting the image quality or resolution.

"Invalid face_index value"

  • Explanation: This error occurs when the specified face_index is out of range, meaning there are fewer faces detected than the index value.
  • Solution: Check the number of faces detected in the image and ensure that the face_index value is within the valid range.

"Image format not supported"

  • Explanation: This error occurs when the input image is not in a format that the node can process.
  • Solution: Convert the image to a supported format, typically a tensor representation, before inputting it into the node.

RetinaFace PM Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-Portrait-Maker
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.