Visit ComfyUI Online for ready-to-use ComfyUI environment
Converts point list to mask image for AI artists, leveraging numpy for efficient computation.
NegiTools_PointListToMask is a utility node designed to convert a list of points into a mask image. This node is particularly useful for AI artists who need to create masks based on specific coordinates within an image. By providing a list of points, along with the desired dimensions and radius, the node generates a mask where each point is represented as a filled circle. This can be beneficial for tasks such as segmentation, object detection, or any scenario where you need to highlight specific areas within an image. The node leverages numpy for efficient computation, ensuring that the mask generation process is both fast and accurate.
The point_list parameter is a string that contains a JSON-encoded list of points. Each point should be represented as an object with x and y coordinates, where x and y are normalized values between 0 and 1. This parameter is essential as it defines the locations within the image where the mask will be applied. The default value is an empty string, and it does not support multiline input.
The width parameter specifies the width of the output mask image in pixels. It determines the horizontal dimension of the mask. The value must be an integer between 0 and 4096, with a default value of 512. Adjusting this parameter allows you to control the resolution of the mask, which can be crucial for different applications.
The height parameter defines the height of the output mask image in pixels. It sets the vertical dimension of the mask. Similar to the width parameter, the value must be an integer between 0 and 4096, with a default value of 512. This parameter helps in controlling the resolution and aspect ratio of the generated mask.
The radius parameter determines the radius of the circles drawn around each point in the mask. The value must be an integer between 1 and 2048, with a default value of 50. This parameter is important for defining the size of the masked areas around each point, allowing you to adjust the prominence of each point in the final mask.
The MASK output parameter is a numpy array representing the generated mask image. The mask is a 2D array where each element corresponds to a pixel in the image, with values indicating whether the pixel is part of the mask (1) or not (0). This output is crucial for further processing in tasks such as image segmentation, where the mask can be used to isolate specific regions of interest.
point_list parameter is correctly formatted as a JSON string with normalized x and y coordinates to avoid errors during mask generation.radius parameter to control the size of the masked areas around each point, which can help in fine-tuning the mask for different applications.width and height values to match the resolution of your input images, ensuring that the generated mask aligns correctly with the original image.point_list parameter contains a string that is not properly formatted as JSON.point_list string is a valid JSON array of objects, each with x and y properties.width or height parameter is set to a value outside the allowed range (0-4096).width and height values to be within the specified range.radius parameter is set to a value outside the allowed range (1-2048).radius value to be within the specified range to ensure proper mask generation.RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Playground, enabling artists to harness the latest AI tools to create incredible art.