Visit ComfyUI Online for ready-to-use ComfyUI environment
Versatile image cropping node with multiple modes for precise control and efficient workflow enhancement.
The CROP (JOV) ✂️ node is designed to provide versatile cropping capabilities for your images, allowing you to focus on specific areas of interest or to fit images into desired dimensions. This node supports various cropping modes, including freeform polygonal cropping, XY coordinate-based cropping, and center cropping. By leveraging these functionalities, you can enhance your image composition, remove unwanted sections, or prepare images for further processing. The CROP (JOV) ✂️ node is particularly useful for AI artists who need precise control over their image layouts and want to streamline their workflow with efficient cropping techniques.
This parameter represents the input image to be cropped. If no image is provided, a solid channel image will be used as a default. The input image is converted from a tensor to an OpenCV format for processing.
This parameter determines the cropping mode to be used. It can take values from the EnumCropMode
enumeration, such as FREE
, XY
, HEAD
, BODY
, or CENTER
. Each mode specifies a different method of cropping the image. For example, FREE
allows for polygonal cropping based on specified points, while CENTER
crops the image around its center.
This parameter specifies the width and height of the cropping area. It is used to define the dimensions of the cropped image, ensuring that the output fits the desired size.
This parameter is used in the FREE
cropping mode and represents the top-left and top-right coordinates of the cropping polygon. These coordinates are normalized values between 0 and 1, indicating the relative position within the image.
This parameter is also used in the FREE
cropping mode and represents the bottom-left and bottom-right coordinates of the cropping polygon. Similar to tltr
, these coordinates are normalized values between 0 and 1.
This parameter is used in the XY
cropping mode and specifies the X and Y coordinates for cropping. It allows for precise cropping based on specific pixel positions within the image.
This parameter defines the color to be used for the cropped area. It is particularly useful when the cropped area needs to be filled with a specific color, ensuring consistency in the output image.
The output is a tensor representing the cropped image. This tensor can be used for further processing or as a final output, depending on your workflow. The cropped image retains the specified dimensions and cropping mode applied during the process.
FREE
mode for complex cropping shapes by specifying the polygonal coordinates.CENTER
mode is the most straightforward and efficient.wihi
parameter to ensure the cropped image fits your desired dimensions.color
parameter to fill the cropped area with a specific color, maintaining visual consistency.func
parameter was set to an invalid value not recognized by the EnumCropMode
enumeration.func
parameter is set to one of the valid values: FREE
, XY
, HEAD
, BODY
, or CENTER
.tltr
or blbr
are outside the valid range of 0 to 1. - Solution: Verify that all coordinates are normalized values between 0 and 1, representing relative positions within the image.wihi
parameter was not provided, leading to undefined dimensions for the cropping area.wihi
parameter is set with the desired width and height for the cropping area.© Copyright 2024 RunComfy. All Rights Reserved.