ComfyUI  >  Nodes  >  WAS Node Suite >  Inset Image Bounds

ComfyUI Node: Inset Image Bounds

Class Name

Inset Image Bounds

Category
WAS Suite/Image/Bound
Author
WASasquatch (Account age: 4688 days)
Extension
WAS Node Suite
Latest Updated
8/25/2024
Github Stars
1.1K

How to Install WAS Node Suite

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

Inset Image Bounds Description

Adjust image boundaries with specified insets for precise region focus in image processing tasks.

Inset Image Bounds:

The Inset Image Bounds node is designed to adjust the boundaries of an image by applying specified insets to its edges. This node is particularly useful for refining the area of interest within an image by trimming or expanding the boundaries from the left, right, top, and bottom. By modifying these bounds, you can focus on specific regions of the image, which can be beneficial for various image processing tasks such as cropping, zooming, or preparing images for further analysis. The primary goal of this node is to provide a flexible and precise way to manipulate image boundaries, ensuring that the resulting bounds are valid and within the original image dimensions.

Inset Image Bounds Input Parameters:

image_bounds

This parameter represents the initial boundaries of the image that you want to adjust. It is a tuple containing the minimum and maximum row and column indices that define the current bounds of the image. The function of this parameter is to provide the starting point for the insetting process.

inset_left

This parameter specifies the number of pixels to inset from the left edge of the image. The default value is 64, with a minimum value of 0 and a maximum value of 0xffffffffffffffff. Adjusting this parameter will move the left boundary of the image inward by the specified number of pixels, effectively trimming the left side of the image.

inset_right

This parameter specifies the number of pixels to inset from the right edge of the image. The default value is 64, with a minimum value of 0 and a maximum value of 0xffffffffffffffff. Adjusting this parameter will move the right boundary of the image inward by the specified number of pixels, effectively trimming the right side of the image.

inset_top

This parameter specifies the number of pixels to inset from the top edge of the image. The default value is 64, with a minimum value of 0 and a maximum value of 0xffffffffffffffff. Adjusting this parameter will move the top boundary of the image downward by the specified number of pixels, effectively trimming the top side of the image.

inset_bottom

This parameter specifies the number of pixels to inset from the bottom edge of the image. The default value is 64, with a minimum value of 0 and a maximum value of 0xffffffffffffffff. Adjusting this parameter will move the bottom boundary of the image upward by the specified number of pixels, effectively trimming the bottom side of the image.

Inset Image Bounds Output Parameters:

IMAGE_BOUNDS

This output parameter returns the new boundaries of the image after applying the specified insets. It is a tuple containing the updated minimum and maximum row and column indices that define the new bounds of the image. This output is crucial for understanding the adjusted area of interest within the image and can be used for further image processing tasks.

Inset Image Bounds Usage Tips:

  • Ensure that the insets you provide do not exceed the original image dimensions to avoid invalid bounds.
  • Use this node to focus on specific regions of interest within an image by trimming unnecessary edges.
  • Combine this node with other image processing nodes to create a more refined and targeted workflow.

Inset Image Bounds Common Errors and Solutions:

Invalid insets provided. Please make sure the insets do not exceed the image bounds.

  • Explanation: This error occurs when the specified insets result in invalid boundaries, such as when the insets are larger than the original image dimensions.
  • Solution: Verify that the insets you provide are within the allowable range and do not exceed the original image dimensions. Adjust the insets accordingly to ensure valid bounds.

Inset Image Bounds Related Nodes

Go back to the extension to check out more related nodes.
WAS Node Suite
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.