Image Prep For ICLora(ImagePrepForICLora)
This node receives a reference image and allows the user to specify the target output width, height, and border width.
Image Prep For IC Lora
The Image Prep For ICLora node receives a reference image and allows users to specify the target output width, height, and border width.
The Image Prep For ICLora node is an image preprocessing tool specifically designed to prepare input images for the ICLora model. Its core functionality is to resize the reference image and process related masks, ensuring the image format meets the requirements for subsequent model processing.
Node Functionality
This node receives a reference image and allows users to specify the target output width, height, and border width. Internally, it intelligently scales the image based on the aspect ratio of the reference image and supports precise control over the effective image area through optional mask parameters. The node outputs the resized and mask-processed image along with its corresponding mask.
Node Parameter Description - Image Prep For ICLora
Connection Inputs (Inputs)
| Parameter Name | Data Type | Required | Default Value | Range/Options | Description |
|---|---|---|---|---|---|
reference_image | IMAGE | Yes | - | - | reference_image (Input Parameter): The reference image used as the processing baseline. The node will perform resizing and mask application based on this image. |
latent_image | IMAGE | No | - | - | latent_image (Input Parameter): An optional latent image used to determine the batch size of the output image. |
latent_mask | MASK | No | - | - | latent_mask (Input Parameter): An optional mask for controlling regions of the latent image. |
reference_mask | MASK | No | - | - | reference_mask (Input Parameter): An optional mask used to define the effective area to be retained in the reference image. |
Control Parameters (Parameters)
| Parameter Name | Data Type | Required | Default Value | Range/Options | Description |
|---|---|---|---|---|---|
output_width | INT | Yes | 1024 | 1 - 4096 (Step: 1) | output_width (Input Parameter): Sets the width of the output image, ranging from 1 to 4096 with a step of 1. |
output_height | INT | Yes | 1024 | 1 - 4096 (Step: 1) | output_height (Input Parameter): Sets the height of the output image, ranging from 1 to 4096 with a step of 1. |
border_width | INT | Yes | 0 | 0 - 4096 (Step: 1) | border_width (Input Parameter): Sets the width of the border to be added to the image, ranging from 0 to 4096 with a step of 1. |
Output
| Parameter Name | Data Type | Description |
|---|---|---|
| IMAGE | IMAGE | IMAGE (Output Parameter): The final image after resizing and mask processing. |
| MASK | MASK | The mask processed in the same way. |
Usage Scenarios
In image generation or style transfer workflows, when you need to combine a reference image (e.g., a portrait photo) with a latent image (e.g., a scene sketch), you can use this node. First, connect the reference image and the latent image to the node, set the desired output dimensions. The node will output a processed image that can be directly fed into the ICLora model to guide the generation of new images that incorporate features from the reference image.
Notes
Please note that this node has specific logic for handling the batch size of input images. If a latent image is provided and its batch size differs from that of the reference image, the node will automatically replicate the reference image to match the batch size of the latent image.
Image Prep For ICLora Node Source Code Link
The Image Prep For ICLora node is from the ComfyUI-KJNodes node package.
Comments
Sign in with GitHub to join the discussion.