ComfyUI  >  Nodes  >  KJNodes for ComfyUI >  Batch Uncrop

ComfyUI Node: Batch Uncrop

Class Name

BatchUncrop

Category
KJNodes/masking
Author
kijai (Account age: 2192 days)
Extension
KJNodes for ComfyUI
Latest Updated
6/25/2024
Github Stars
0.3K

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

Batch Uncrop Description

Restore cropped images to original dimensions seamlessly, maintaining image integrity and context for AI artists.

Batch Uncrop:

The BatchUncrop node is designed to seamlessly restore cropped images back to their original dimensions. This node is particularly useful for AI artists who need to revert modifications made during the cropping process, ensuring that the integrity and context of the original image are maintained. By leveraging advanced techniques, BatchUncrop can handle various scenarios, including border blending and rescaling, to produce a smooth and natural uncropped image. This node is essential for workflows that involve iterative editing and refinement, allowing you to experiment with different crops and easily revert to the original state without losing any details.

Batch Uncrop Input Parameters:

original_images

This parameter takes the original set of images before any cropping was applied. It is crucial as it serves as the reference for restoring the cropped images to their original dimensions.

cropped_images

This parameter includes the images that have been cropped. These are the images that will be restored to their original dimensions using the BatchUncrop node.

bboxes

Bounding boxes that define the regions of the cropped images. These coordinates are used to accurately place the cropped images back into their original positions within the uncropped image.

border_blending

This parameter controls the blending of borders between the cropped and original images. It ensures a smooth transition and avoids harsh edges, making the uncropped image look natural.

crop_rescale

This parameter determines if the cropped images should be rescaled to match the dimensions of the original images. It ensures that the restored images maintain the correct proportions and fit seamlessly into the original context.

border_top

Specifies the number of pixels to blend at the top border of the cropped image. This helps in achieving a smooth transition between the cropped and original images.

border_bottom

Specifies the number of pixels to blend at the bottom border of the cropped image. This helps in achieving a smooth transition between the cropped and original images.

border_left

Specifies the number of pixels to blend at the left border of the cropped image. This helps in achieving a smooth transition between the cropped and original images.

border_right

Specifies the number of pixels to blend at the right border of the cropped image. This helps in achieving a smooth transition between the cropped and original images.

Batch Uncrop Output Parameters:

original_images

The original set of images before any cropping was applied. This output is useful for reference and comparison purposes.

cropped_out

A stack of the cropped images that have been processed. This output allows you to see the results of the uncropping process and verify that the images have been restored correctly.

bounding_boxes

The bounding boxes used during the uncropping process. These coordinates can be useful for further processing or analysis.

max_bbox_width

The maximum width of the bounding boxes used in the uncropping process. This value provides insight into the dimensions of the cropped regions.

max_bbox_height

The maximum height of the bounding boxes used in the uncropping process. This value provides insight into the dimensions of the cropped regions.

Batch Uncrop Usage Tips:

  • Ensure that the original_images and cropped_images parameters are correctly aligned to avoid mismatches during the uncropping process.
  • Use the border_blending parameter to achieve smooth transitions between the cropped and original images, especially when dealing with complex backgrounds.
  • Adjust the crop_rescale parameter to maintain the correct proportions of the restored images, ensuring they fit seamlessly into the original context.
  • Fine-tune the border_top, border_bottom, border_left, and border_right parameters to achieve the best visual results for your specific images.

Batch Uncrop Common Errors and Solutions:

"Mismatched image dimensions"

  • Explanation: This error occurs when the dimensions of the original_images and cropped_images do not match.
  • Solution: Ensure that the original_images and cropped_images parameters are correctly aligned and have matching dimensions.

"Invalid bounding box coordinates"

  • Explanation: This error occurs when the bounding box coordinates are outside the dimensions of the original images.
  • Solution: Verify that the bounding box coordinates are within the valid range for the original images and adjust them if necessary.

"Blending parameter out of range"

  • Explanation: This error occurs when the blending parameters (border_top, border_bottom, border_left, border_right) are set to values outside the acceptable range.
  • Solution: Ensure that the blending parameters are within the valid range and adjust them to appropriate values for smooth transitions.

Batch Uncrop 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.