Save 4 hours! We auto-setup your workflow! Free!

Drop your workflow.json — we handle every dependency, custom node, and model. Just open the link and run.

Auto-Setup Workflow Json (Free) Now!
ComfyUI > Nodes > Comfyui-PixNodes > Image Crop Edge (PixNodes)

ComfyUI Node: Image Crop Edge (PixNodes)

Class Name

Pix_ImageCropEdge

Category
PixNodes
Author
pixixai (Account age: 512days)
Extension
Comfyui-PixNodes
Latest Updated
2026-05-27
Github Stars
0.02K

How to Install Comfyui-PixNodes

Install this extension via the ComfyUI Manager by searching for Comfyui-PixNodes
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter Comfyui-PixNodes 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

Image Crop Edge (PixNodes) Description

Facilitates image edge cropping based on specified size string for AI artists, supporting single/multiple value inputs.

Image Crop Edge (PixNodes):

The Pix_ImageCropEdge node is designed to facilitate the cropping of image edges by parsing a specified crop size string. This node is particularly useful for AI artists who need to trim unwanted borders from images, allowing for more focused and aesthetically pleasing compositions. By supporting both single and multiple value inputs, it offers flexibility in defining how much of each edge (top, bottom, left, right) should be cropped. This capability is essential for refining images to meet specific artistic or compositional requirements, ensuring that the final output aligns with the creator's vision. The node's primary function is to interpret the crop size string and apply the corresponding edge cropping to the image, making it a valuable tool for image preprocessing in creative workflows.

Image Crop Edge (PixNodes) Input Parameters:

image

The image parameter is the input image that you want to crop. It is expected to be in a tensor format with dimensions [B, H, W, C], where B is the batch size, H is the height, W is the width, and C is the number of channels. This parameter is crucial as it provides the raw data that the node will process to produce the cropped output.

crop_size

The crop_size parameter is a string that specifies the amount of cropping to be applied to each edge of the image. It can be a single value, which will be uniformly applied to all edges, or a comma-separated list of up to four values, corresponding to the top, bottom, left, and right edges, respectively. For example, a value of "10" will crop 10 pixels from all sides, while "10,20,10,5" will crop 10 pixels from the top, 20 from the bottom, 10 from the left, and 5 from the right. The default value is "0", meaning no cropping. This parameter allows for precise control over the cropping process, enabling you to tailor the output to your specific needs.

Image Crop Edge (PixNodes) Output Parameters:

IMAGE

The output parameter is the cropped image, returned in the same tensor format as the input. This output reflects the modifications specified by the crop_size parameter, with the edges trimmed according to the defined values. The cropped image is essential for further processing or final use, as it represents the refined version of the original input, tailored to meet specific artistic or compositional goals.

Image Crop Edge (PixNodes) Usage Tips:

  • To achieve uniform cropping on all sides of an image, provide a single integer value for the crop_size parameter, such as "10", which will crop 10 pixels from each edge.
  • For more complex cropping needs, specify up to four values in the crop_size parameter to individually control the cropping of the top, bottom, left, and right edges, like "10,20,30,40".

Image Crop Edge (PixNodes) Common Errors and Solutions:

ValueError: invalid literal for int() with base 10

  • Explanation: This error occurs when the crop_size string contains non-numeric values or improperly formatted numbers.
  • Solution: Ensure that the crop_size string only contains integers separated by commas, with no extra spaces or non-numeric characters.

Cropped image has zero dimensions

  • Explanation: This issue arises when the specified crop size exceeds the dimensions of the image, resulting in an empty output.
  • Solution: Verify that the crop size values are appropriate for the dimensions of the input image, ensuring that the resulting cropped dimensions are greater than zero.

Image Crop Edge (PixNodes) Related Nodes

Go back to the extension to check out more related nodes.
Comfyui-PixNodes
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.

Image Crop Edge (PixNodes)