Nodes/ComfyUI-Kaola-Nodes/Kaola Image Scale By Aspect Ratio
ComfyUI Node

Kaola Image Scale By Aspect Ratio

A ComfyUI node in image/transform with 10 inputs and 4 outputs.

By kana112233·Created 7 months ago·Updated 7 months ago· 0
Kaola Image Scale By Aspect Ratio
  • image
  • image
  • mask
  • original_size
  • target_size
aspect_ratiooriginal
aspect_ratio_width16.0
aspect_ratio_height9.0
scale_modeby_longest
target_length1024
fit_modeletterbox
background_color#000000
multiple_of8
methodlanczos
Categoryimage/transform

Inputs (10)

NameTypeDefaultDescription
imageIMAGE输入图像 | Input image
aspect_ratioCOMBOoriginal目标宽高比 | Target aspect ratio
aspect_ratio_widthFLOAT16.01–10000自定义宽高比宽度 (当选择custom时生效) | Custom aspect ratio width
aspect_ratio_heightFLOAT9.01–10000自定义宽高比高度 (当选择custom时生效) | Custom aspect ratio height
scale_modeCOMBOby_longest缩放基准模式 | Scale mode based on dimension
target_lengthINT102464–8192目标边长 | Target length for the chosen scale mode
fit_modeCOMBOletterbox适配模式: Letterbox(黑边), Crop(裁剪), Stretch(拉伸) | Fit mode
background_colorSTRING#000000Letterbox模式下的背景颜色(十六进制) | Background color for letterbox mode (hex)
multiple_ofINT81–512输出尺寸圆整倍数 (通常为8) | Round output dimensions to multiple of (usually 8)
methodCOMBOlanczos缩放算法 | Resampling method

Outputs (4)

NameTypeDescription
imageIMAGE
maskMASK
original_sizeSTRING
target_sizeSTRING