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
ImagePrepForICLora
ComfyUI Node Documentation: ImagePrepForICLora
Overview
The ImagePrepForICLora node is designed to prepare images for use with ICLora technology. It allows the user to adjust the size and aspect ratio of the input reference image while optionally incorporating a latent image and mask to blend into the final output image. This node is particularly useful in workflows where images need to be standardized for input into machine learning models that require images of a specific size and aspect ratio.
Inputs
The ImagePrepForICLora node accepts the following inputs:
-
Reference Image (Required):
This is the main image to be processed. It is provided in the form of an image data type. -
Output Width (Required):
Specifies the desired width of the output image. This is an integer value and can range from 1 to 4096 pixels. -
Output Height (Required):
Specifies the desired height of the output image. This is an integer value and can range from 1 to 4096 pixels. -
Border Width (Required):
Indicates the width of any border to be added between the reference image and the latent image. This is an integer and can range from 0 to 4096 pixels. -
Latent Image (Optional):
If provided, this image is combined with the reference image, filling areas defined by the latent mask (if provided). -
Latent Mask (Optional):
A mask that accompanies the latent image, defining which parts of the latent image should be displayed in the final output. It helps in blending the latent image into the reference image. -
Reference Mask (Optional):
This mask defines areas of the reference image to be retained in the final output, useful for masking out certain parts of the reference image.
Outputs
The ImagePrepForICLora node produces two primary outputs:
-
Padded Image (IMAGE):
A finalized image where the reference image is resized and combined with the latent image if provided. The output dimensions match those specified by the user through theOutput WidthandOutput Heightparameters. -
Padded Mask (MASK):
A corresponding mask that reflects the changes and masking operations applied to the output image, useful for understanding or further processing the visible parts of the image.
Usage in ComfyUI Workflows
The ImagePrepForICLora node is utilized in ComfyUI workflows where images need to be prepared with a standard size and format, such as when generating inputs for machine learning models like ICLora. It ensures that different image sources can be seamlessly integrated into a single cohesive image with well-defined boundaries and masked areas.
- Formatting Input for Models: Resize and adjust images to meet input specifications for various models.
- Image Composition: Combine images using reference and latent photos, along with their corresponding masks, for creative compositions or model training.
- Data Preparation: Standardize images as part of a preprocessing pipeline, ensuring consistency in datasets used for analytic or visualization purposes.
Special Features and Considerations
- Aspect Ratio Adjustment: Automatically adjusts the aspect ratio of the reference image to fit within the defined output dimensions, preserving image content or expanding canvas size if needed.
- Masking Capabilities: By utilizing reference and latent masks, users have precise control over which parts of an image are visible in the final output.
- Combining Images: Facilitates the blending of reference images with latent images for advanced composite images, where each component brings different elements to the final visual.
- Flexibility in Inputs: Optional inputs for latent images and masks allow users to either provide additional data for complex processing or proceed with simply resizing a single reference image.
The ImagePrepForICLora node is a highly versatile component within ComfyUI, enabling users to effectively prepare images for advanced processing environments or outputs that require specific format requirements.