ComfyUI > Nodes > WAS Node Suite > Image Padding

ComfyUI Node: Image Padding

Class Name

Image Padding

Category
WAS Suite/Image/Transform
Author
WASasquatch (Account age: 4688days)
Extension
WAS Node Suite
Latest Updated
2024-08-25
Github Stars
1.07K

How to Install WAS Node Suite

Install this extension via the ComfyUI Manager by searching for WAS Node Suite
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter WAS Node Suite in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Image Padding Description

Node for adding customizable padding around images, including feathered edges for seamless blending and artistic enhancement.

Image Padding:

Image Padding is a node designed to add padding around an image, which can be particularly useful for tasks such as outpainting, where additional space around the image is needed for further processing or artistic enhancement. This node allows you to specify the amount of padding to be added on each side of the image, ensuring that the original content remains centered and intact. The padding can be customized to include a feathered edge, which helps blend the padded area smoothly with the original image, creating a more natural transition. This feature is especially beneficial for AI artists looking to expand their artwork seamlessly or prepare images for further manipulation without losing the original composition.

Image Padding Input Parameters:

image

This parameter represents the input image that you want to add padding to. The image should be in a format that is compatible with the node, such as PNG or JPEG. The quality and resolution of the input image will directly affect the final output.

left_pad

This parameter specifies the amount of padding to be added to the left side of the image. The value is measured in pixels. The minimum value is 0, and there is no strict maximum value, but it should be reasonable relative to the image size. The default value is 100 pixels.

right_pad

This parameter specifies the amount of padding to be added to the right side of the image. The value is measured in pixels. The minimum value is 0, and there is no strict maximum value, but it should be reasonable relative to the image size. The default value is 100 pixels.

top_pad

This parameter specifies the amount of padding to be added to the top of the image. The value is measured in pixels. The minimum value is 0, and there is no strict maximum value, but it should be reasonable relative to the image size. The default value is 100 pixels.

bottom_pad

This parameter specifies the amount of padding to be added to the bottom of the image. The value is measured in pixels. The minimum value is 0, and there is no strict maximum value, but it should be reasonable relative to the image size. The default value is 100 pixels.

feather_radius

This parameter determines the radius of the feathered edge applied to the padding. The feathered edge helps blend the padded area with the original image, creating a smoother transition. The value is measured in pixels. The minimum value is 0, and the maximum value depends on the image size and desired effect. The default value is 50 pixels.

second_pass

This boolean parameter indicates whether a second pass of feathering should be applied to the image. Enabling this option can enhance the smoothness of the transition between the original image and the padded area. The default value is True.

Image Padding Output Parameters:

new_im

This output parameter represents the new image with the added padding. The image will have the specified padding on all sides, and if feathering is enabled, the edges will be smoothly blended with the original content. The output image retains the original format and quality.

padding_mask

This output parameter is a mask image that indicates the areas where padding has been added. The mask can be used for further processing or analysis, helping to distinguish between the original content and the padded regions. The mask is provided in an RGB format.

Image Padding Usage Tips:

  • To achieve a seamless extension of your artwork, use the feather_radius parameter to blend the padded area smoothly with the original image.
  • When preparing images for outpainting, ensure that the padding values are sufficient to provide the necessary space for further processing.
  • Use the padding_mask output to identify and manipulate the padded regions separately if needed.

Image Padding Common Errors and Solutions:

Image size mismatch

  • Explanation: The input image dimensions do not match the expected size after padding.
  • Solution: Ensure that the padding values are correctly specified and that the input image is in the correct format.

Feathering artifacts

  • Explanation: Visible artifacts appear at the edges of the padded area due to improper feathering.
  • Solution: Adjust the feather_radius parameter to achieve a smoother transition, and consider enabling the second_pass option for enhanced blending.

Unsupported image format

  • Explanation: The input image is in a format that is not supported by the node.
  • Solution: Convert the image to a compatible format such as PNG or JPEG before using the node.

Image Padding Related Nodes

Go back to the extension to check out more related nodes.
WAS Node Suite
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.