Visit ComfyUI Online for ready-to-use ComfyUI environment
Resize images while maintaining aspect ratio to fit within specified size, useful for AI artists standardizing image dimensions.
The FS: Fit Size From Image node is designed to help you resize an image while maintaining its aspect ratio, ensuring that the resized image fits within a specified maximum size. This node is particularly useful for AI artists who need to standardize image dimensions for various applications, such as preparing images for model training or ensuring consistency across a dataset. By leveraging this node, you can easily resize images without distorting their proportions, making it a valuable tool for maintaining the visual integrity of your artwork.
This parameter accepts an image that you want to resize. The image should be in a format that the node can process, such as a tensor representation of an image. The node will use this image as the basis for resizing operations.
This integer parameter defines the maximum size (in pixels) to which the image should be resized. The default value is 768, and it can be adjusted in steps of 8. This parameter ensures that the resized image's width or height does not exceed the specified maximum size, helping to standardize image dimensions.
This parameter is a boolean option that determines whether the image should be upscaled if its dimensions are smaller than the specified max_size. The available options are "false" and "true". If set to "false", the image will not be upscaled beyond its original dimensions. If set to "true", the image can be upscaled to fit the max_size.
This integer output represents the width of the resized image. It is calculated based on the original image dimensions and the specified max_size, ensuring that the aspect ratio is maintained.
This integer output represents the height of the resized image. Similar to Fit Width, it is calculated to maintain the aspect ratio while fitting within the specified max_size.
This float output represents the aspect ratio of the original image, calculated as the width divided by the height. This value is useful for understanding the proportions of the image and ensuring that they are maintained during resizing.
<image_path>
© Copyright 2024 RunComfy. All Rights Reserved.