Visit ComfyUI Online for ready-to-use ComfyUI environment
Automatically generates image masks based on text prompts using natural language processing for AI artists.
The "Mask By Text" node is designed to automatically generate a mask for an image based on a given text prompt. This node leverages the power of natural language processing to interpret the text and create a corresponding mask that highlights specific areas of the image as described by the prompt. This can be particularly useful for AI artists who want to isolate or emphasize certain parts of an image without manually creating masks. By providing both a positive and a negative prompt, you can fine-tune the mask to better match your artistic vision. The node also offers options to adjust the precision of the mask and normalize the results, making it a versatile tool for various creative applications.
The image
parameter is the input image on which the mask will be generated. This should be an image file that you want to process.
The prompt
parameter is a text string that describes the areas of the image you want to highlight or mask. This can be a detailed description and supports multiline input, allowing for complex and nuanced prompts.
The negative_prompt
parameter is a text string that describes the areas of the image you want to exclude from the mask. Like the prompt
parameter, it supports multiline input and helps refine the mask by specifying what should not be included.
The precision
parameter is a float value that determines the accuracy of the mask generation. It ranges from 0.0 to 1.0, with a default value of 0.5. A higher precision value results in a more accurate but potentially more complex mask, while a lower value may produce a simpler mask.
The normalize
parameter is a choice between "yes" and "no" that determines whether the mask should be normalized. Normalization can help in standardizing the mask values, making it easier to work with in subsequent processing steps.
The thresholded_mask
is an image output that represents the binary mask generated based on the text prompt. This mask is thresholded, meaning it has been processed to clearly distinguish the masked areas from the rest of the image.
The raw_mask
is an image output that represents the initial mask generated from the text prompt before any thresholding or additional processing. This raw mask can provide more detailed information and can be useful for further custom processing.
prompt
and negative_prompt
combinations to achieve the desired mask. The more specific and detailed your prompts, the better the mask will match your vision.precision
parameter to balance between mask accuracy and complexity. Higher precision is useful for detailed masks, while lower precision can be sufficient for simpler tasks.normalize
option to standardize the mask values, especially if you plan to use the mask in further image processing steps.image
parameter is not a valid image file.prompt
or negative_prompt
parameter is left empty.prompt
and negative_prompt
parameters to generate an effective mask.precision
parameter is set to a value outside the allowed range of 0.0 to 1.0.precision
parameter to a value within the range of 0.0 to 1.0.normalize
parameter is set to a value other than "yes" or "no".normalize
parameter is set to either "yes" or "no".© Copyright 2024 RunComfy. All Rights Reserved.