ComfyUI  >  Nodes  >  Allor Plugin >  ImageTransformCropRelative

ComfyUI Node: ImageTransformCropRelative

Class Name

ImageTransformCropRelative

Category
image/transform
Author
Nourepide (Account age: 2900 days)
Extension
Allor Plugin
Latest Updated
5/22/2024
Github Stars
0.2K

How to Install Allor Plugin

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

ImageTransformCropRelative Description

Crop images based on relative coordinates for intuitive and flexible area selection, enhancing workflow efficiency.

ImageTransformCropRelative:

The ImageTransformCropRelative node is designed to crop images based on relative coordinates, allowing you to specify the cropping area as a proportion of the image's dimensions. This node is particularly useful for AI artists who want to focus on specific regions of an image without needing to calculate exact pixel values. By using relative coordinates, you can easily define the cropping area in a more intuitive and flexible manner, making it easier to apply consistent cropping across images of different sizes. This node simplifies the process of isolating parts of an image for further processing or analysis, enhancing your workflow efficiency and creative control.

ImageTransformCropRelative Input Parameters:

images

This parameter expects a list of images that you want to crop. The images should be in a format that the node can process, typically tensors representing the image data.

start_x

This parameter defines the relative starting x-coordinate for the cropping area. It is a float value between 0.0 and 1.0, where 0.0 represents the left edge of the image and 1.0 represents the right edge. The default value is 0.25. Adjusting this value will shift the left boundary of the cropping area horizontally.

start_y

This parameter defines the relative starting y-coordinate for the cropping area. It is a float value between 0.0 and 1.0, where 0.0 represents the top edge of the image and 1.0 represents the bottom edge. The default value is 0.25. Adjusting this value will shift the top boundary of the cropping area vertically.

end_x

This parameter defines the relative ending x-coordinate for the cropping area. It is a float value between 0.0 and 1.0, where 0.0 represents the left edge of the image and 1.0 represents the right edge. The default value is 0.75. Adjusting this value will shift the right boundary of the cropping area horizontally.

end_y

This parameter defines the relative ending y-coordinate for the cropping area. It is a float value between 0.0 and 1.0, where 0.0 represents the top edge of the image and 1.0 represents the bottom edge. The default value is 0.75. Adjusting this value will shift the bottom boundary of the cropping area vertically.

ImageTransformCropRelative Output Parameters:

IMAGE

The output is a list of cropped images. Each image is cropped according to the specified relative coordinates, resulting in a new image that contains only the defined region. This allows you to focus on specific parts of the image for further processing or analysis.

ImageTransformCropRelative Usage Tips:

  • To crop the central region of an image, set start_x and start_y to values around 0.25 and end_x and end_y to values around 0.75.
  • For a quick way to crop the top-left quarter of an image, set start_x and start_y to 0.0 and end_x and end_y to 0.5. - Use small increments (e.g., 0.01) to fine-tune the cropping area for precise control over the region of interest.

ImageTransformCropRelative Common Errors and Solutions:

"Invalid coordinate values"

  • Explanation: This error occurs if the start_x, start_y, end_x, or end_y values are outside the range of 0.0 to 1.0.
  • Solution: Ensure that all coordinate values are within the valid range of 0.0 to 1.0.

"End coordinates must be greater than start coordinates"

  • Explanation: This error occurs if the end_x is less than or equal to start_x, or end_y is less than or equal to start_y.
  • Solution: Adjust the end_x and end_y values to be greater than the start_x and start_y values, respectively.

"Input images not in expected format"

  • Explanation: This error occurs if the input images are not in the expected tensor format.
  • Solution: Ensure that the input images are provided in the correct format, typically as tensors representing the image data.

ImageTransformCropRelative Related Nodes

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