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
BatchUncropAdvanced
BatchUncropAdvanced Node Documentation
Overview
The BatchUncropAdvanced node is a utility within the ComfyUI framework created to process image batches in a sophisticated manner. It is particularly designed to handle images and their corresponding cropped sections, allowing users to blend and compose these elements back into their original context. This node supports enhanced operations by leveraging combined masks and bounding boxes, offering flexibility in the image processing and manipulation tasks.
Functionality
What This Node Does
The BatchUncropAdvanced node takes original images and their cropped counterparts along with masks and bounding boxes to reconstruct the original images. It is capable of applying border blending to smoothly integrate cropped images back into their originals. This advanced node offers functionalities like using combined masks for compositing and the option to utilize square or original masks.
Inputs
Required Inputs
-
original_images: A set of original images, which have been cropped. These images are used as the canvas onto which the cropped images are placed back.
-
cropped_images: The images that have been extracted (or cropped out) from the original images. These will be resized and pasted back into their corresponding positions.
-
cropped_masks: Masks corresponding to each crop in the cropped_images list, used to guide where information is exposed and blended.
-
combined_crop_mask: A mask that represents the combination of multiple masks, used when applying a unified operation across the cropping regions.
-
bboxes: Bounding boxes that define the coordinates and size of each crop region in the original images.
-
border_blending: A float value dictating the blend ratio (0 to 1) along the borders when re-integrating cropped images. This generates smooth transitions between cropped and original image segments.
-
crop_rescale: A float that defines scaling applied to the cropped images before being placed back onto the originals, allowing adjustment to fit appropriately.
-
use_combined_mask: A boolean switch to determine whether to use the combined mask instead of individual cropped masks for blending.
-
use_square_mask: A boolean deciding whether to use square masks for blending operations, which can affect aesthetics and transitions.
Optional Inputs
- combined_bounding_box: Used when the combined mask option is selected, providing a single bounding box that applies to all operations within the node.
Outputs
- Reassembled Images: The node outputs the final images where the cropped images have been seamlessly reincorporated into the original images, respecting the input parameters like blending, scaling, and masking choices.
Usage in ComfyUI Workflows
This node is instrumental in workflows where images undergo various segmenting processes and need to revert parts back into their initial form. Some common use cases include:
- Image Restoration: Where images are cropped and processed individually for improvement and must be merged back.
- Batch Image Processing: Useful in scenarios involving operations on different parts of an image to apply targeted edits or enhancements.
- Custom Image Manipulation: Developers can leverage this node to implement specific image transformations and compositions based on artistic needs or correctional workflows.
Special Features and Considerations
- Flexibility with Masks: Users can choose between using individual cropped masks or an all-encompassing combined mask which provides consistency across multiple cropped areas.
- Blending Capabilities: The node enhances image integration by blending border areas. The blending ratio is a powerful tool for achieving natural-looking composites.
- Scalable Operations: The crop_rescale feature empowers users to adjust the size of cropped sections before reintegration, thus ensuring they fit properly with the original context.
- Dynamic Region Handling: The combined_bounding_box input offers a dynamic approach when dealing with multiple cropped regions, ensuring a streamlined and cohesive output when necessary.
In conclusion, the BatchUncropAdvanced node plays a pivotal role in composite image manipulation within the ComfyUI framework. Its robust, tailored features cater to complex image processing needs that demand precision and flexibility.