Visit ComfyUI Online for ready-to-use ComfyUI environment
Facilitates creation of customizable rectangles on image canvas for AI artists, with options for dimensions, position, appearance, and anti-aliasing.
The AD_ImageDrawRectangleSimple
node is designed to facilitate the creation of simple, customizable rectangles on an image canvas. This node is particularly useful for AI artists who want to add geometric shapes to their digital artwork with ease. It allows you to define the dimensions and position of the rectangle, as well as customize its appearance with rounded corners and color fills. The node supports anti-aliasing through Super-Sampling Anti-Aliasing (SSAA) to ensure smooth edges, and it provides flexibility in choosing the resampling method for resizing operations. By leveraging this node, you can efficiently incorporate rectangles into your compositions, enhancing the visual structure and design of your images.
The width
parameter specifies the width of the canvas on which the rectangle will be drawn. It determines the horizontal size of the image and indirectly affects the rectangle's position and size. The default value is 512, with a minimum of 1, ensuring that the canvas is always visible.
The height
parameter defines the height of the canvas. Similar to the width
, it sets the vertical size of the image, influencing the rectangle's placement and dimensions. The default value is 512, with a minimum of 1.
The left
parameter indicates the inward offset from the left edge of the canvas to the rectangle's left side. It allows you to position the rectangle horizontally within the canvas. The default value is 50, with a minimum of 0.
The top
parameter specifies the inward offset from the top edge of the canvas to the rectangle's top side. This parameter helps in vertically positioning the rectangle. The default value is 50, with a minimum of 0.
The right
parameter represents the inward offset from the right edge of the canvas to the rectangle's right side. It is used to adjust the rectangle's horizontal size and position. The default value is 50, with a minimum of 0.
The bottom
parameter defines the inward offset from the bottom edge of the canvas to the rectangle's bottom side. It helps in controlling the rectangle's vertical size and position. The default value is 50, with a minimum of 0.
The radius
parameter determines the curvature of the rectangle's corners, allowing you to create rounded rectangles. A higher value results in more rounded corners. The default value is 20, with a minimum of 0.
The fill_red
parameter sets the red component of the rectangle's fill color. It ranges from 0 to 255, with a default value of 255, allowing you to adjust the intensity of the red color in the rectangle.
The fill_green
parameter controls the green component of the rectangle's fill color. It also ranges from 0 to 255, with a default value of 255, enabling you to modify the green intensity in the rectangle.
The fill_blue
parameter specifies the blue component of the rectangle's fill color. Like the other color parameters, it ranges from 0 to 255, with a default value of 255, allowing you to adjust the blue intensity.
The fill_alpha
parameter determines the transparency level of the rectangle's fill color. It ranges from 0 (completely transparent) to 1 (completely opaque), providing control over the rectangle's visibility.
The SSAA
parameter stands for Super-Sampling Anti-Aliasing, which is used to smooth the edges of the rectangle. It is a multiplier that enhances the quality of the rendered rectangle by reducing jagged edges.
The method
parameter specifies the resampling method used when resizing the canvas back to its original dimensions after applying SSAA. It affects the final quality of the image and can be chosen based on the desired output.
The tensor
output is a representation of the image with the drawn rectangle, converted into a format suitable for further processing or analysis. It includes the color and transparency information of the rectangle.
The mask_tensor
output provides a mask of the rectangle, indicating the areas covered by the rectangle in the image. This mask can be used for various purposes, such as blending or compositing with other images.
SSAA
value, which will apply more anti-aliasing and result in a higher-quality image.method
values to find the resampling technique that best suits your artistic style and the specific requirements of your project.width
or height
parameters are set to values less than the minimum allowed.width
and height
are set to values greater than or equal to 1.fill_red
, fill_green
, fill_blue
) are set outside the range of 0 to 255. - Solution: Adjust the color parameters to be within the valid range of 0 to 255.fill_alpha
parameter is set outside the range of 0 to 1.fill_alpha
parameter to a value between 0 and 1 to ensure proper transparency settings.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.