ComfyUI > Nodes > ComfyUI-EditUtils > EditUtils: Crop With Pad Info lrzjason

ComfyUI Node: EditUtils: Crop With Pad Info lrzjason

Class Name

CropWithPadInfo_EditUtils

Category
image
Author
lrzjason (Account age: 0days)
Extension
ComfyUI-EditUtils
Latest Updated
2026-03-20
Github Stars
0.1K

How to Install ComfyUI-EditUtils

Install this extension via the ComfyUI Manager by searching for ComfyUI-EditUtils
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-EditUtils 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
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

EditUtils: Crop With Pad Info lrzjason Description

The node accurately crops images to original dimensions by removing padding, preserving aspect ratio.

EditUtils: Crop With Pad Info lrzjason:

The CropWithPadInfo_EditUtils node is designed to handle image processing tasks that involve cropping an image while considering padding information. This node is particularly useful when you need to revert an image to its original dimensions after it has been padded for processing. By extracting padding details, such as the amount of padding added to the right and bottom edges, this node allows you to accurately crop the image back to its original content area. This functionality is essential for maintaining the integrity of the image's original composition, especially in workflows where images are resized or padded for uniformity during processing. The node ensures that the cropped image retains its original aspect ratio and scale, making it a valuable tool for AI artists who need precise control over image dimensions and content.

EditUtils: Crop With Pad Info lrzjason Input Parameters:

image

The image parameter represents the input image that you want to crop. This image should be in a format that supports dimension manipulation, typically a tensor with dimensions representing height, width, and channels. The function of this parameter is to provide the source image from which the original content will be extracted by removing any padding that was previously added. There are no specific minimum, maximum, or default values for this parameter, as it depends on the image being processed.

pad_info

The pad_info parameter is a dictionary containing information about the padding that was added to the image. It includes keys such as x, y, width, height, and scale_by, which describe the padding dimensions and scaling factor. This parameter is crucial for determining how much of the image should be cropped to return to its original state. The x and y values are typically zero, while width and height indicate the amount of padding added to the right and bottom edges, respectively. The scale_by value is used to adjust the scale of the cropped image. There are no specific minimum, maximum, or default values for this parameter, as it is derived from the padding process.

EditUtils: Crop With Pad Info lrzjason Output Parameters:

cropped_image

The cropped_image output is the result of the cropping operation, where the original content of the image is extracted by removing the padding. This output is crucial for workflows that require the image to be restored to its original dimensions and composition. The cropped_image retains the original aspect ratio and scale, ensuring that the visual integrity of the image is maintained.

scale_by

The scale_by output is a float value that represents the scaling factor applied to the cropped image. This value is important for understanding how the image's dimensions have been adjusted during the cropping process. It provides insight into the relationship between the original and processed image sizes, which can be useful for further image processing tasks or analysis.

EditUtils: Crop With Pad Info lrzjason Usage Tips:

  • Ensure that the pad_info parameter accurately reflects the padding added during the initial image processing to achieve precise cropping results.
  • Use the scale_by output to adjust subsequent image processing steps, ensuring that the image maintains its intended scale and aspect ratio.

EditUtils: Crop With Pad Info lrzjason Common Errors and Solutions:

Missing pad_info

  • Explanation: The pad_info parameter is missing or not provided in the input, which is necessary for the cropping operation.
  • Solution: Ensure that the pad_info dictionary is included in the input and contains the correct padding details.

Incorrect image format

  • Explanation: The input image is not in a compatible format for dimension manipulation, leading to errors during processing.
  • Solution: Convert the image to a compatible format, such as a tensor with dimensions representing height, width, and channels, before using the node.

EditUtils: Crop With Pad Info lrzjason Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-EditUtils
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

EditUtils: Crop With Pad Info lrzjason