Visit ComfyUI Online for ready-to-use ComfyUI environment
Prepare images for outpainting by adjusting aspect ratios and adding padding for seamless extension or further processing.
The AspectPadImageForOutpainting
node is designed to help you prepare images for outpainting by adjusting their aspect ratios and adding padding as needed. This node is particularly useful when you need to fit an image into a specific aspect ratio without distorting its content. By resizing the image and adding padding, it ensures that the image maintains its original proportions while fitting into the desired dimensions. This is especially beneficial for AI artists who want to extend their artwork seamlessly or prepare images for further processing in a consistent format. The node offers flexibility in terms of aspect ratios and padding justifications, making it a versatile tool for various outpainting tasks.
The image
parameter is the input image that you want to adjust for outpainting. This image should be in a format that the node can process, typically a tensor with shape (bs, h, w, c)
, where bs
is the batch size, h
is the height, w
is the width, and c
is the number of channels. The image will be resized and padded according to the specified aspect ratio and justification settings.
The aspect_ratio
parameter allows you to select the desired aspect ratio for the output image. You can choose from a predefined list of aspect ratios, such as SDXL_1-1_square_1024x1024
, SDXL_4-3_landscape_1152x896
, and many others. The default value is `SD1.5
The justification
parameter specifies how the image should be aligned within the padded area. You can choose from top-left
, center
, or bottom-right
, with the default being center
. This setting affects where the image will be placed within the new dimensions, allowing you to control the padding distribution around the image.
The IMAGE
output is the adjusted image that has been resized and padded to fit the specified aspect ratio. This image maintains the original content's proportions while fitting into the new dimensions, making it ready for outpainting or further processing.
The left
output parameter indicates the number of pixels added as padding to the left side of the image. This value helps you understand how the image has been adjusted horizontally.
The top
output parameter indicates the number of pixels added as padding to the top of the image. This value helps you understand how the image has been adjusted vertically.
The right
output parameter indicates the number of pixels added as padding to the right side of the image. This value helps you understand how the image has been adjusted horizontally.
The bottom
output parameter indicates the number of pixels added as padding to the bottom of the image. This value helps you understand how the image has been adjusted vertically.
center
justification for a balanced padding distribution, which is often visually pleasing and maintains the focus on the central part of the image.{c}
channels. Image shape = {image.shape}
{aspect_ratio}
ASPECT_RATIO_MAP
.© Copyright 2024 RunComfy. All Rights Reserved.