ComfyUI > Nodes > Allor Plugin > ImageTransformCropCorners

ComfyUI Node: ImageTransformCropCorners

Class Name

ImageTransformCropCorners

Category
image/transform
Author
Nourepide (Account age: 2900days)
Extension
Allor Plugin
Latest Updated
2024-05-22
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

ImageTransformCropCorners Description

Crop images with rounded corners, customizable radius and corner selection, supports SSAA for smooth results, ideal for AI artists.

ImageTransformCropCorners:

The ImageTransformCropCorners node is designed to crop images by rounding the corners based on specified parameters. This node is particularly useful for creating images with rounded corners, which can add a polished and professional look to your artwork. By adjusting the radius and selecting which corners to round, you can achieve a variety of visual effects. The node also supports Super-Sampling Anti-Aliasing (SSAA) to enhance the quality of the rounded corners, ensuring smooth and visually appealing results. This node is ideal for AI artists looking to add a unique touch to their images by manipulating the corner shapes.

ImageTransformCropCorners Input Parameters:

images

This parameter accepts a batch of images that you want to process. Each image in the batch will be subjected to the same corner cropping and rounding operations. The images should be in a tensor format.

radius

The radius parameter determines the curvature of the rounded corners. A larger radius will result in more pronounced rounding, while a smaller radius will produce subtler curves. The value should be a positive integer.

top_left_corner

This boolean parameter specifies whether the top-left corner of the image should be rounded. Set it to "true" to round the corner or "false" to keep it sharp.

top_right_corner

This boolean parameter specifies whether the top-right corner of the image should be rounded. Set it to "true" to round the corner or "false" to keep it sharp.

bottom_right_corner

This boolean parameter specifies whether the bottom-right corner of the image should be rounded. Set it to "true" to round the corner or "false" to keep it sharp.

bottom_left_corner

This boolean parameter specifies whether the bottom-left corner of the image should be rounded. Set it to "true" to round the corner or "false" to keep it sharp.

SSAA

The SSAA parameter stands for Super-Sampling Anti-Aliasing. It is used to improve the quality of the rounded corners by rendering the image at a higher resolution and then downscaling it. A higher SSAA value will result in smoother corners but will require more computational resources.

method

The method parameter specifies the resampling method to be used when resizing the image. Options include "lanczos", "bicubic", "hamming", "bilinear", "box", and "nearest". Each method has its own characteristics in terms of quality and performance.

ImageTransformCropCorners Output Parameters:

images

The output is a batch of images with the specified corners rounded. The images are returned in a tensor format, ready for further processing or saving. The rounded corners will have a smooth, anti-aliased appearance if SSAA is used.

ImageTransformCropCorners Usage Tips:

  • To achieve the smoothest possible rounded corners, use a higher SSAA value, but be mindful of the increased computational load.
  • Experiment with different resampling methods to find the one that best suits your artistic needs. For example, lanczos and bicubic generally provide higher quality results.
  • Use boolean parameters for corners to selectively round only the corners you need, allowing for creative flexibility in your designs.

ImageTransformCropCorners Common Errors and Solutions:

ValueError: Invalid method

  • Explanation: This error occurs when an unsupported resampling method is specified.
  • Solution: Ensure that the method parameter is set to one of the following: "lanczos", "bicubic", "hamming", "bilinear", "box", or "nearest".

RuntimeError: shape '[...]' is invalid for input of size [...]

  • Explanation: This error may occur if the input images are not in the expected tensor format or if there is a mismatch in dimensions.
  • Solution: Verify that the input images are correctly formatted as tensors and that their dimensions match the expected input shape.

ImageTransformCropCorners 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.