ComfyUI  >  Nodes  >  Allor Plugin >  ImageDrawChord

ComfyUI Node: ImageDrawChord

Class Name

ImageDrawChord

Category
image/draw
Author
Nourepide (Account age: 2900 days)
Extension
Allor Plugin
Latest Updated
5/22/2024
Github Stars
0.2K

How to Install Allor Plugin

Install this extension via the ComfyUI Manager by searching for  Allor Plugin
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter Allor Plugin in the search bar
After installation, click the  Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

ImageDrawChord Description

Draw complex chord shapes on image canvas with precise control over angles, coordinates, color, and transparency.

ImageDrawChord:

The ImageDrawChord node is designed to draw a chord, which is a region bounded by the intersection of an ellipse and a line segment, on an image canvas. This node is particularly useful for creating complex shapes and designs in your AI-generated artwork. By specifying the start and end angles, as well as the bounding box coordinates, you can precisely control the appearance of the chord. The node also allows you to customize the color and transparency of the chord, making it a versatile tool for adding detailed graphical elements to your images.

ImageDrawChord Input Parameters:

container

This parameter represents the input image container from which the dimensions are derived. It is used to determine the width and height of the canvas on which the chord will be drawn.

size

This parameter defines the thickness of the chord's outline. It impacts how bold or thin the chord appears on the canvas. The value should be a positive integer.

start_x

This parameter specifies the x-coordinate of the starting point of the bounding box for the chord, as a fraction of the image width. It ranges from 0 to 1, where 0 represents the left edge and 1 represents the right edge of the image.

start_y

This parameter specifies the y-coordinate of the starting point of the bounding box for the chord, as a fraction of the image height. It ranges from 0 to 1, where 0 represents the top edge and 1 represents the bottom edge of the image.

end_x

This parameter specifies the x-coordinate of the ending point of the bounding box for the chord, as a fraction of the image width. It ranges from 0 to 1, where 0 represents the left edge and 1 represents the right edge of the image.

end_y

This parameter specifies the y-coordinate of the ending point of the bounding box for the chord, as a fraction of the image height. It ranges from 0 to 1, where 0 represents the top edge and 1 represents the bottom edge of the image.

start

This parameter defines the starting angle of the chord in degrees. It determines where the chord begins along the ellipse's perimeter.

end

This parameter defines the ending angle of the chord in degrees. It determines where the chord ends along the ellipse's perimeter.

red

This parameter specifies the red component of the chord's color. It ranges from 0 to 255.

green

This parameter specifies the green component of the chord's color. It ranges from 0 to 255.

blue

This parameter specifies the blue component of the chord's color. It ranges from 0 to 255.

alpha

This parameter specifies the transparency level of the chord. It ranges from 0 (completely transparent) to 1 (completely opaque).

SSAA

This parameter stands for Supersample Anti-Aliasing. It is a multiplier that enhances the quality of the drawn chord by rendering it at a higher resolution and then downscaling it. Higher values result in smoother edges but require more processing power.

method

This parameter specifies the resampling method used when resizing the canvas back to its original dimensions. Common methods include "nearest", "bilinear", and "bicubic".

ImageDrawChord Output Parameters:

IMAGE

The output is an image tensor containing the drawn chord. This tensor can be used in subsequent nodes for further image processing or rendering. The output image retains the original dimensions of the input container but includes the newly drawn chord.

ImageDrawChord Usage Tips:

  • To achieve smoother edges on your chord, increase the SSAA parameter. However, be mindful of the increased computational load.
  • Experiment with different start and end angles to create various shapes and effects. For example, setting the start and end angles to 0 and 180 degrees respectively will create a semi-circle.
  • Use the alpha parameter to blend the chord with the background image, creating more visually appealing and integrated designs.

ImageDrawChord Common Errors and Solutions:

"Invalid container dimensions"

  • Explanation: This error occurs when the input container does not have valid dimensions.
  • Solution: Ensure that the input container is a valid image tensor with appropriate dimensions.

"Invalid color values"

  • Explanation: This error occurs when the color parameters (red, green, blue) are outside the range of 0 to 255. - Solution: Verify that the color values are within the acceptable range.

"Invalid SSAA value"

  • Explanation: This error occurs when the SSAA parameter is set to a non-positive value.
  • Solution: Set the SSAA parameter to a positive integer to enable Supersample Anti-Aliasing.

"Invalid resampling method"

  • Explanation: This error occurs when the method parameter is set to an unsupported resampling method.
  • Solution: Use a supported resampling method such as "nearest", "bilinear", or "bicubic".

ImageDrawChord Related Nodes

Go back to the extension to check out more related nodes.
Allor Plugin
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.