floyo logobeta logo
Powered by
ThinkDiffusion
floyo logobeta logo
Powered by
ThinkDiffusion

Face Cropper Node (2:3 Ratio)

10

Last updated
2025-03-07

The Face Cropper Node is a specialized component for ComfyUI that crops images to a 2:3 aspect ratio while ensuring the primary subject remains centered. It is designed to enhance image processing workflows by accommodating various image sizes and shapes without losing important visual content.

  • Automatically crops images to a 2:3 ratio while keeping the subject centered.
  • Adapts to different image dimensions, preserving maximum height and adjusting width accordingly.
  • Includes robust error handling for inputs that do not meet the expected shape criteria.

Context

The Face Cropper Node, identified as MarwanFaceCropping, is a custom node tailored for use within ComfyUI, a popular user interface for managing and executing machine learning models. Its primary function is to crop images to a specified aspect ratio, which is particularly useful for portrait images or any application where maintaining a specific composition is essential.

Key Features & Benefits

This node automatically crops images to a 2:3 aspect ratio, ensuring that the subject remains as centered as possible. It effectively handles various input image sizes, allowing for greater flexibility in your image processing tasks. The inclusion of error handling means that users can avoid disruptions in their workflow due to incorrect image dimensions.

Advanced Functionalities

The Face Cropper Node stands out with its advanced ability to maintain the maximum height of the input image while adjusting the width to achieve the desired aspect ratio. This is particularly beneficial for users working with diverse image formats, as it minimizes the risk of cutting off important visual elements.

Practical Benefits

By integrating the Face Cropper Node into ComfyUI workflows, users can significantly enhance their control over image composition and quality. This tool streamlines the cropping process, making it easier to produce visually appealing images that adhere to specific aspect ratios without compromising the integrity of the subject matter.

Credits/Acknowledgments

The Face Cropper Node is developed and maintained by Marwan206, and it is distributed under the MIT License, allowing for broad usage and contributions from the community.