ComfyUI > Nodes > ComfyUI-Portrait-Maker > ImageScaleShort PM

ComfyUI Node: ImageScaleShort PM

Class Name

PM_ImageScaleShort

Category
protrait/other
Author
THtianhao (Account age: 3700days)
Extension
ComfyUI-Portrait-Maker
Latest Updated
2024-05-22
Github Stars
0.17K

How to Install ComfyUI-Portrait-Maker

Install this extension via the ComfyUI Manager by searching for ComfyUI-Portrait-Maker
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-Portrait-Maker 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

ImageScaleShort PM Description

Resize images based on shorter side, maintain aspect ratio, crop option for specific size, high-quality resizing for AI artists.

ImageScaleShort PM:

The PM_ImageScaleShort node is designed to resize an image based on its shorter side, ensuring that the aspect ratio is maintained. This node is particularly useful for preparing images for further processing or for standardizing image sizes in a workflow. It offers an optional feature to crop the image to a specific size, which can be beneficial for focusing on particular areas, such as faces in portrait images. By leveraging advanced resampling techniques, the node ensures high-quality resizing, making it an essential tool for AI artists looking to optimize their images for various applications.

ImageScaleShort PM Input Parameters:

image

This parameter accepts the input image that you want to resize. The image should be in a compatible format that the node can process.

size

This parameter defines the target size for the shorter side of the image. The node will resize the image such that the shorter side matches this value while maintaining the aspect ratio. The default value is 512, with a minimum of 0 and a maximum of 2048, adjustable in steps of 1.

crop_face

This boolean parameter determines whether the image should be cropped to focus on the face area after resizing. If set to true, the image will be resized and then cropped to ensure the face is centered and fits within the specified dimensions. The default value is false.

ImageScaleShort PM Output Parameters:

image

The output is the resized image, which has been adjusted according to the specified size and optionally cropped to focus on the face. The image is returned in a format compatible with further processing or display.

ImageScaleShort PM Usage Tips:

  • To maintain the aspect ratio while resizing images, set the size parameter to the desired value for the shorter side of the image.
  • Use the crop_face parameter to focus on faces in portrait images, ensuring that the face is centered and fits within the specified dimensions.
  • Experiment with different size values to find the optimal resolution for your specific use case, balancing quality and performance.

ImageScaleShort PM Common Errors and Solutions:

Image format not supported

  • Explanation: The input image is in a format that the node cannot process.
  • Solution: Ensure that the input image is in a compatible format, such as JPEG or PNG.

Size parameter out of range

  • Explanation: The size parameter is set to a value outside the allowed range (0 to 2048).
  • Solution: Adjust the size parameter to a value within the allowed range.

No face detected for cropping

  • Explanation: The crop_face parameter is set to true, but no face is detected in the image.
  • Solution: Ensure that the input image contains a clear and recognizable face, or set the crop_face parameter to false if face detection is not required.

ImageScaleShort PM Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-Portrait-Maker
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.