Visit ComfyUI Online for ready-to-use ComfyUI environment
Generate random masks within specified image dimensions for AI artists, offering flexibility and reproducibility.
The GR Mask Create Random node is designed to generate a random mask within a specified image dimension. This node is particularly useful for AI artists who need to create random regions of interest within an image for various artistic or preprocessing purposes. By defining the height, width, mask size, and an optional seed for reproducibility, this node creates a mask with a random position and size, ensuring a unique and varied output each time. The primary goal of this node is to provide a flexible and easy-to-use tool for generating random masks, which can be used in a variety of creative and technical applications.
The height parameter specifies the height of the image in pixels. It determines the vertical dimension of the mask and must be an integer value greater than or equal to 1. This parameter is crucial as it sets the boundary within which the mask will be generated.
The width parameter specifies the width of the image in pixels. It determines the horizontal dimension of the mask and must be an integer value greater than or equal to 1. This parameter is essential for defining the horizontal boundary for the mask generation.
The mask_size parameter defines the size of the mask as a fraction of the smaller dimension of the image (either height or width). It is a floating-point value between 0.01 and 1, with a step of 0.01. This parameter controls how large the mask will be relative to the image dimensions, allowing for fine-tuned control over the mask's size.
The seed parameter is an optional integer value that sets the random seed for mask generation. It ensures reproducibility of the mask if the same seed is used again. The seed must be an integer greater than or equal to 1, with a default value of 0. This parameter is useful for generating consistent results across different runs.
The MASK output parameter is a tensor representing the generated mask. It is a binary mask with the same height and width as specified in the input parameters, where the masked region is filled with ones and the rest of the image is filled with zeros. This output is essential for defining areas of interest within an image for further processing or artistic manipulation.
© Copyright 2024 RunComfy. All Rights Reserved.