Visit ComfyUI Online for ready-to-use ComfyUI environment
Generates facial region mask aligned with landmarks for image processing and AI art.
The MaskFromFaceModel
node is designed to generate a mask from a given face model, which can be particularly useful in various image processing and AI art applications. This node takes a face model and creates a mask that highlights the facial region based on the landmarks provided by the face model. The mask can be used for further image manipulation, such as applying effects or isolating the face from the background. The node ensures that the mask is accurately aligned with the facial features, providing a reliable tool for artists and developers working with facial data.
The face_model
parameter is a required input that accepts a face model or a list of face models. This model contains the facial landmarks that will be used to generate the mask. The landmarks are typically in a 2D format and are essential for accurately outlining the facial region. If multiple face models are provided, the node can handle them accordingly.
The size_as
parameter is a required input that specifies the size of the output mask. It takes an image whose dimensions will be used to determine the size of the mask. This ensures that the mask generated will match the dimensions of the provided image, making it easier to overlay the mask on the original image.
The max_face_number
parameter is an optional input that limits the number of faces to be processed. It accepts an integer value with a default of -1, which means no limit. If set to a positive integer, the node will process only up to that number of faces, prioritizing the most prominent ones. This can be useful when dealing with images containing multiple faces and you only want to focus on a few.
The MASK
output is the generated mask that highlights the facial region based on the provided face model. The mask is a tensor with values scaled between 0 and 1, where the facial region is highlighted. This output can be used for various image processing tasks, such as applying filters, isolating the face, or further analysis.
size_as
parameter to match the dimensions of the mask with the original image for seamless overlay.max_face_number
parameter to limit the number of faces processed, focusing on the most prominent ones.size_as
parameter is set to an image with the correct dimensions to ensure the mask matches the image size.max_face_number
limit.max_face_number
parameter to accommodate the number of faces in the face model or reduce the number of faces in the input.© Copyright 2024 RunComfy. All Rights Reserved.