ComfyUI  >  Nodes  >  ComfyUI-0246 >  Box Range

ComfyUI Node: Box Range

Class Name

0246.BoxRange

Category
0246
Author
Trung0246 (Account age: 3389 days)
Extension
ComfyUI-0246
Latest Updated
5/24/2024
Github Stars
0.1K

How to Install ComfyUI-0246

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

Box Range Description

Process and manipulate bounding box data within a specified range for AI artists.

Box Range:

The 0246.BoxRange node is designed to process and manipulate bounding box data within a specified range. This node is particularly useful for AI artists who need to handle and transform box coordinates and dimensions in their projects. It provides a flexible and powerful way to map, normalize, and snap box data to different scales and resolutions. The node can handle various transformations such as width, height, aspect ratio, and positional adjustments, making it an essential tool for tasks that involve spatial data manipulation.

Box Range Input Parameters:

box_range

The box_range parameter represents the bounding box data that you want to process. It is a list containing the coordinates and dimensions of the boxes. This parameter is crucial as it defines the initial data set that will be transformed by the node. The box_range should be provided in a specific format, typically as a list of lists where each sublist contains the x, y, width, and height of a box.

box_range_ratio

The box_range_ratio parameter defines the ratio or scale to which the bounding box data will be mapped. This parameter is essential for scaling the box dimensions and coordinates to fit within a specified range. It typically includes data such as width, height, and aspect ratio, which are used to adjust the box data accordingly.

script_box_regex

The script_box_regex parameter is a regular expression used to match and process specific keys within the box data. This parameter allows for advanced customization and filtering of the box data based on the provided regex pattern. It is particularly useful for complex data processing tasks where only certain parts of the box data need to be transformed.

script_order

The script_order parameter defines the order in which the script should process the box data. This parameter is important for ensuring that the transformations are applied in the correct sequence, which can affect the final output. It is typically provided as a list or a single value indicating the processing order.

Box Range Output Parameters:

full_res

The full_res parameter is the primary output of the 0246.BoxRange node. It contains the fully processed and transformed bounding box data. This output includes all the adjustments made based on the input parameters, such as scaling, mapping, and snapping. The full_res output is typically a list of lists, where each sublist represents a transformed box with its new coordinates and dimensions.

Box Range Usage Tips:

  • To effectively use the 0246.BoxRange node, ensure that your box_range input is correctly formatted and contains valid box data.
  • Utilize the box_range_ratio parameter to scale your box data to the desired dimensions and aspect ratio.
  • Use the script_box_regex parameter for advanced filtering and customization of the box data processing.
  • Pay attention to the script_order parameter to control the sequence of transformations and ensure the desired output.

Box Range Common Errors and Solutions:

"Invalid box_range format"

  • Explanation: The box_range input is not in the expected format.
  • Solution: Ensure that the box_range is a list of lists, with each sublist containing the x, y, width, and height of a box.

"Invalid box_range_ratio data"

  • Explanation: The box_range_ratio input does not contain the necessary data for scaling.
  • Solution: Verify that the box_range_ratio includes valid width, height, and aspect ratio data.

"Regex pattern not matching"

  • Explanation: The script_box_regex pattern does not match any keys in the box data.
  • Solution: Check the regex pattern for accuracy and ensure it matches the keys you intend to process.

"Script order not defined"

  • Explanation: The script_order parameter is missing or incorrectly defined.
  • Solution: Provide a valid script_order value to define the processing sequence.

Box Range Related Nodes

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