ComfyUI-KJNodes
Run ComfyUI Easily with InstaSD
Skip the complex setup. InstaSD helps creative professionals build workflows and deploy them to the world:
- One-click deployment
- Any model, any node
- Powerful GPUs for rapid iteration
Available Nodes
BatchUncrop
BatchUncrop Node Documentation
The BatchUncrop node is part of the KJNodes collection for ComfyUI. It is designed to reintegrate previously cropped images back into their original context using bounding box information. This process involves handling borders and scaling, allowing for seamless recomposition of the full image.
Overview
Purpose
The BatchUncrop node takes a set of cropped images, along with their respective bounding boxes, and patches them back onto the original images. The node allows for adjustments to the blending of the cropped areas with the surrounding borders of the original images, ensuring a smooth transition.
Key Features
- Seamless reintegration of cropped images into their original canvas.
- Customizable border blending for smooth transitions.
- Optional resizing of crops for effective recomposition.
- Configurable borders with options to blend top, bottom, left, and right edges.
Inputs
The BatchUncrop node requires the following inputs:
-
Original Images: This input consists of the full set of images from which parts have been previously cropped.
-
Cropped Images: This input includes the set of images that have been cropped and need to be patched back into their original places.
-
Bounding Boxes: A list of bounding boxes corresponding to where each cropped image should be placed within the original images.
-
Border Blending: A float value (0 to 1) specifying the intensity of blending at the borders of the cropped images. Higher values result in more blending.
-
Crop Rescale: A float value that adjusts the scale size of the cropped images when reintegrating them into the original. Values greater than 1 enlarge the cropped portion, while values less than 1 reduce it.
-
Border Flags (Top, Bottom, Left, Right): Boolean flags that enable or disable blending on specified borders of the cropped image.
Outputs
The BatchUncrop node provides the following output:
- Reintegrated Images: A set of images where the cropped images have been patched back into their respective original images, with specified border blending applied.
Usage in ComfyUI Workflows
The BatchUncrop node is useful in workflows where images have been divided into parts for processing (such as enhancement or anonymization) and need to be reassembled seamlessly. Common use cases include:
-
Image Restoration: After specific portions of an image are processed separately to correct or alter functionalities, the BatchUncrop node reintegrates them into the original canvas with smooth transitions.
-
Image Composition: In scenarios involving breaking down and recomposing images (for instance, collaging), this node can seamlessly stitch images back together.
-
Masking and Refinement Pipelines: When combined with masking workflows in ComfyUI, this node allows for reassembly after applying targeted changes to specific image regions.
Special Features and Considerations
-
Blending Controls: The node provides significant control over how the cropped sections transition back into the original images, preventing hard edges or seams from being visible.
-
Flexibility in Application: Depending on your project needs, enabling or disabling specific border blending options allows you to tailor the reintegration process finely.
-
Implementation Considerations: Ensure that each bounding box list corresponds precisely to the cropped images and that both sets of inputs (cropped images and bounding boxes) are synchronized with the original image set for optimal results.
The BatchUncrop node is a powerful tool for users needing to manage detailed image recomposition tasks within the ComfyUI environment. By controlling how cropped images are reintegrated, it offers flexibility and precision for a variety of image processing workflows.