ComfyUI > Nodes > ComfyUI > Crop Image

ComfyUI Node: Crop Image

Class Name

ImageCropV2

Category
image/transform
Author
ComfyAnonymous (Account age: 763days)
Extension
ComfyUI
Latest Updated
2026-05-13
Github Stars
112.77K

How to Install ComfyUI

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

Crop Image Description

Efficiently crop images for AI art projects, highlighting key details and removing unwanted elements with precision.

Crop Image:

The ImageCropV2 node is designed to provide a streamlined and efficient way to crop images within your AI art projects. This node allows you to specify a particular region of an image that you wish to retain, effectively trimming away the unwanted parts. By focusing on a specific area, you can highlight important details or remove extraneous elements, enhancing the overall composition of your artwork. The node is particularly useful for tasks that require precise image manipulation, such as preparing images for further processing or creating specific visual effects. Its ability to handle intermediate outputs makes it a versatile tool in your image transformation toolkit, ensuring that you can preview and adjust your crops as needed.

Crop Image Input Parameters:

image

The image parameter is the primary input for the ImageCropV2 node, representing the image data that you wish to crop. This parameter accepts an image tensor, which is a multi-dimensional array containing pixel data. The image serves as the canvas from which a specific region will be extracted based on the defined crop region. The quality and resolution of the input image can significantly impact the final cropped output, so it's important to ensure that the image is of sufficient quality for your intended use.

crop_region

The crop_region parameter defines the specific area of the image that you want to retain. It is represented as a bounding box with properties such as x, y, width, and height. The x and y values determine the starting coordinates of the crop region, while width and height specify the dimensions of the area to be cropped. The default values for width and height are set to 512 pixels, but these can be adjusted to suit your needs. The crop region allows for precise control over which part of the image is kept, enabling you to focus on areas of interest or remove unwanted sections.

Crop Image Output Parameters:

image

The output parameter image provides the cropped version of the input image based on the specified crop region. This output is an image tensor that contains only the pixels within the defined bounding box, effectively isolating the desired portion of the original image. The cropped image can be used for further processing, analysis, or as a final output in your AI art project. The ability to preview the cropped image ensures that you can make adjustments as needed to achieve the desired result.

Crop Image Usage Tips:

  • Ensure that the crop_region is within the bounds of the input image to avoid errors and ensure a successful crop.
  • Use the preview feature to adjust the crop region interactively, allowing you to fine-tune the area of interest before finalizing the crop.
  • Consider the aspect ratio of the crop region to maintain visual balance and composition in the cropped image.

Crop Image Common Errors and Solutions:

Crop region out of bounds

  • Explanation: This error occurs when the specified crop region extends beyond the dimensions of the input image.
  • Solution: Adjust the x, y, width, and height values of the crop region to ensure they fit within the image's dimensions.

Invalid image input

  • Explanation: This error arises when the input provided is not a valid image tensor.
  • Solution: Verify that the input is a correctly formatted image tensor and that it contains valid pixel data.

Crop Image Related Nodes

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

Crop Image