ComfyUI > Nodes > ComfyUI Easy Use > imageUncropFromBBOX

ComfyUI Node: imageUncropFromBBOX

Class Name

easy imageUncropFromBBOX

Category
EasyUse/Image
Author
yolain (Account age: 1341days)
Extension
ComfyUI Easy Use
Latest Updated
2024-06-25
Github Stars
0.51K

How to Install ComfyUI Easy Use

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

imageUncropFromBBOX Description

Integrates cropped images back using bounding box for AI artists, ensuring accurate restoration with blending options.

imageUncropFromBBOX:

The easy imageUncropFromBBOX node is designed to seamlessly integrate cropped images back into their original context using bounding box coordinates. This node is particularly useful for AI artists who need to restore or manipulate specific regions of an image that have been previously cropped. By leveraging bounding box data, the node ensures that the cropped image is accurately placed back into its original position, maintaining the visual coherence of the artwork. Additionally, the node offers options for border blending and mask usage, providing flexibility in how the uncropped image is rendered. This functionality is essential for tasks that involve detailed image editing, restoration, or compositing, where maintaining the integrity of the original image is crucial.

imageUncropFromBBOX Input Parameters:

original_image

This parameter expects the original image from which a region was cropped. It is used as the base onto which the cropped image will be placed. The original image should be in the same format and dimensions as it was before cropping.

crop_image

This parameter takes the cropped image that needs to be placed back into the original image. The cropped image should correspond to the region defined by the bounding box.

bbox

The bounding box parameter defines the coordinates and dimensions of the cropped region within the original image. It ensures that the cropped image is accurately positioned when uncropped. The bounding box is typically provided as a tuple of four values: (x, y, width, height).

border_blending

This parameter controls the blending of the border between the original and cropped images. It is a float value ranging from 0.0 to 1.0, with a default value of 0.25. A higher value results in smoother blending, while a lower value maintains a sharper edge.

use_square_mask

This boolean parameter determines whether a square mask should be used during the uncropping process. The default value is True. When enabled, the node uses a square mask to blend the cropped image into the original, which can help in maintaining uniformity.

optional_mask

This optional parameter allows you to provide a custom mask for the uncropping process. The mask can be used to define specific areas of the cropped image that should be blended with the original image. If not provided, the node will use the default mask settings.

imageUncropFromBBOX Output Parameters:

image

The output is the final image with the cropped region accurately placed back into its original position. This image maintains the visual integrity of the original image while incorporating the changes made to the cropped region.

imageUncropFromBBOX Usage Tips:

  • Ensure that the dimensions and format of the original_image and crop_image match to avoid inconsistencies during the uncropping process.
  • Adjust the border_blending parameter to achieve the desired level of smoothness at the edges of the uncropped region. A value closer to 1.0 will result in a more seamless blend.
  • Use the optional_mask parameter to fine-tune the blending process, especially when dealing with complex or irregularly shaped cropped regions.

imageUncropFromBBOX Common Errors and Solutions:

The number of original_images and cropped_images should be the same

  • Explanation: This error occurs when the number of images in the original_image and crop_image parameters do not match.
  • Solution: Ensure that both original_image and crop_image contain the same number of images before running the node.

There should be at least as many bboxes as there are original and cropped images

  • Explanation: This error indicates that the number of bounding boxes provided is less than the number of images in original_image and crop_image.
  • Solution: Provide a bounding box for each image in the original_image and crop_image parameters to resolve this issue.

Warning: Dropping excess bounding boxes. Expected X, but got Y

  • Explanation: This warning is shown when there are more bounding boxes than the number of images in original_image.
  • Solution: Ensure that the number of bounding boxes matches the number of images in original_image and crop_image. Excess bounding boxes will be ignored.

imageUncropFromBBOX Related Nodes

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