ComfyUI > Nodes > KJNodes for ComfyUI > Plot Coordinates

ComfyUI Node: Plot Coordinates

Class Name

PlotCoordinates

Category
KJNodes/experimental
Author
kijai (Account age: 2192days)
Extension
KJNodes for ComfyUI
Latest Updated
2024-06-25
Github Stars
0.35K

How to Install KJNodes for ComfyUI

Install this extension via the ComfyUI Manager by searching for KJNodes for ComfyUI
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter KJNodes for ComfyUI 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

Plot Coordinates Description

Facilitates plotting coordinates onto a tensor for AI artists working with image data.

Plot Coordinates:

The PlotCoordinates node is designed to facilitate the plotting of coordinates onto a tensor, which is particularly useful for AI artists working with image data. This node allows you to specify a set of coordinates and adjust their bounding boxes to fit within a given frame, ensuring that the plotted points are accurately represented within the image dimensions. By leveraging this node, you can effectively manage and visualize spatial data, making it easier to manipulate and interpret complex image-based information. The primary goal of this node is to provide a seamless way to convert coordinate data into a visual format that can be further processed or analyzed.

Plot Coordinates Input Parameters:

coordinates

This parameter takes a JSON string representing a list of coordinates. Each coordinate should be an object with x and y properties. The coordinates define the points to be plotted on the tensor. The JSON string should be properly formatted to ensure accurate parsing and plotting.

height

This parameter specifies the height of the image tensor. It determines the vertical dimension of the frame within which the coordinates will be plotted. The value should be a positive integer representing the number of pixels.

width

This parameter specifies the width of the image tensor. It determines the horizontal dimension of the frame within which the coordinates will be plotted. The value should be a positive integer representing the number of pixels.

bbox_height

This parameter defines the height of the bounding box for each coordinate. It is used to calculate the top-left and bottom-right corners of the bounding box. The value should be a positive integer representing the number of pixels.

bbox_width

This parameter defines the width of the bounding box for each coordinate. It is used to calculate the top-left and bottom-right corners of the bounding box. The value should be a positive integer representing the number of pixels.

size_multiplier

This parameter is a list of multipliers that adjust the size of the bounding boxes for each coordinate. If the list length does not match the number of coordinates, it will be extended or truncated accordingly. The multipliers should be positive numbers, with a default value of [1.0].

prompt

This parameter is a string that can be used to provide additional context or instructions for the plotting process. It can be used to customize the behavior of the node based on specific requirements.

Plot Coordinates Output Parameters:

plot_image_tensor

This output parameter is a tensor representing the image with the plotted coordinates. It contains the visual representation of the input coordinates, adjusted according to the specified bounding box dimensions and size multipliers. This tensor can be further processed or analyzed as needed.

Plot Coordinates Usage Tips:

  • Ensure that the coordinates parameter is a properly formatted JSON string to avoid parsing errors.
  • Use appropriate values for height and width to match the dimensions of your target image.
  • Adjust bbox_height and bbox_width to control the size of the bounding boxes around each coordinate.
  • Utilize the size_multiplier parameter to dynamically scale the bounding boxes based on specific needs.
  • Leverage the prompt parameter to provide additional context or instructions for customized plotting behavior.

Plot Coordinates Common Errors and Solutions:

Invalid JSON format in coordinates

  • Explanation: The coordinates parameter contains a JSON string that is not properly formatted.
  • Solution: Ensure that the JSON string is correctly formatted, with double quotes around property names and values.

Mismatched size_multiplier length

  • Explanation: The length of the size_multiplier list does not match the number of coordinates.
  • Solution: Adjust the length of the size_multiplier list to match the number of coordinates, or let the node automatically extend or truncate the list.

Negative or zero values for height, width, bbox_height, or bbox_width

  • Explanation: One or more of the parameters height, width, bbox_height, or bbox_width have negative or zero values.
  • Solution: Ensure that all these parameters have positive integer values representing the number of pixels.

Plot Coordinates Related Nodes

Go back to the extension to check out more related nodes.
KJNodes for ComfyUI
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.