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

ComfyUI-ImageAutosize

0

Last updated
2025-05-23

A specialized node for ComfyUI that facilitates the resizing and cropping of images tailored for diffusion tasks. It is designed for ease of use, allowing users to preprocess images with minimal adjustments needed.

  • Provides automatic resizing while maintaining the image's aspect ratio.
  • Offers options for cropping to ensure dimensions meet specific requirements for diffusion models.
  • Includes parameters for controlling the resizing method and ensuring dimensions are multiples of a specified value.

Context

This node serves as an integral tool within ComfyUI, specifically aimed at streamlining the process of preparing images for diffusion tasks. Its primary function is to automate the resizing and cropping of images, making it simpler for users to input images without the need for constant parameter adjustments.

Key Features & Benefits

The tool allows users to set a maximum size for the larger dimension of an image while ensuring the smaller dimension meets a minimum size requirement. This feature preserves the original aspect ratio, which is crucial for maintaining image quality. Additionally, the node can adjust image dimensions to be multiples of a specified value, which is particularly beneficial for diffusion models that require specific input sizes.

Advanced Functionalities

This node includes advanced options such as selecting the interpolation mode for resizing and specifying the crop mode. Users can choose to disable cropping or define the origin of the crop, providing flexibility in how images are processed. These functionalities allow for tailored image preparation to meet specific project requirements.

Practical Benefits

By automating the resizing and cropping process, this tool significantly enhances workflow efficiency within ComfyUI. Users can quickly prepare images for diffusion without the need for manual adjustments, thus saving time and reducing the likelihood of errors. The ability to easily conform to model requirements ensures higher quality outputs and a smoother user experience.

Credits/Acknowledgments

This node is adapted from the [img2img_autosize] shortcode of the Unprompted extension, originally developed by ThereforeGames. The tool is part of the open-source community, contributing to the collaborative development of AI art workflows.