Visit ComfyUI Online for ready-to-use ComfyUI environment
Adjust image dimensions with scaling modes for AI artists, ensuring aspect ratio and precise control over final size.
The SDVN Image Size node is designed to adjust the dimensions of an image based on specific scaling modes and parameters. It provides a flexible approach to resizing images, ensuring that they fit within desired dimensions while maintaining their aspect ratio. This node is particularly useful for AI artists who need to prepare images for various applications, such as creating consistent layouts or optimizing images for different display sizes. By offering options to scale images by a maximum size or a specific scale factor, the node allows for precise control over the final image dimensions. Additionally, it can integrate with upscale models to enhance image quality during resizing, making it a powerful tool for both aesthetic and technical image adjustments.
The mode
parameter determines the method used to resize the image. It can be set to "Maxsize" or "Scale". In "Maxsize" mode, the image is resized to fit within the specified width and height, maintaining the aspect ratio. In "Scale" mode, the image dimensions are multiplied by a scale factor. This parameter is crucial as it dictates how the image will be resized, affecting both the final dimensions and the aspect ratio. There are no specific minimum or maximum values, but the choice of mode significantly impacts the resizing process.
The width
parameter specifies the target width for the image when using the "Maxsize" mode. If the width is set to zero, it will be automatically calculated based on the height to maintain the aspect ratio. This parameter allows you to define the maximum width the image should have after resizing, ensuring it fits within specific layout constraints.
The height
parameter specifies the target height for the image when using the "Maxsize" mode. Similar to the width, if the height is set to zero, it will be automatically calculated based on the width to maintain the aspect ratio. This parameter is essential for defining the maximum height the image should have, ensuring it fits within specific layout constraints.
The scale
parameter is used in "Scale" mode to define the factor by which the image dimensions should be multiplied. This parameter allows for proportional resizing of the image, making it larger or smaller while maintaining the original aspect ratio. The scale factor should be a positive number, with values greater than 1 increasing the size and values less than 1 decreasing it.
The model_name
parameter specifies the name of the upscale model to be used for enhancing the image quality during resizing. If a valid model name is provided, the node will apply the upscale model to the image, improving its resolution and detail. This parameter is optional, and if set to "None", no upscale model will be applied.
The resized_image
output is the final image after resizing and any optional upscaling. This output provides the adjusted image that fits the specified dimensions or scale, ready for further use or display. The resized image maintains the aspect ratio and quality enhancements applied during the process.
RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Playground, enabling artists to harness the latest AI tools to create incredible art.