ComfyUI Node
Kaola Image Scale By Aspect Ratio
A ComfyUI node in image/transform with 10 inputs and 4 outputs.
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)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | 输入图像 | Input image | |
| aspect_ratio | COMBO | original | 目标宽高比 | Target aspect ratio |
| aspect_ratio_width | FLOAT | 16.01–10000 | 自定义宽高比宽度 (当选择custom时生效) | Custom aspect ratio width |
| aspect_ratio_height | FLOAT | 9.01–10000 | 自定义宽高比高度 (当选择custom时生效) | Custom aspect ratio height |
| scale_mode | COMBO | by_longest | 缩放基准模式 | Scale mode based on dimension |
| target_length | INT | 102464–8192 | 目标边长 | Target length for the chosen scale mode |
| fit_mode | COMBO | letterbox | 适配模式: Letterbox(黑边), Crop(裁剪), Stretch(拉伸) | Fit mode |
| background_color | STRING | #000000 | Letterbox模式下的背景颜色(十六进制) | Background color for letterbox mode (hex) |
| multiple_of | INT | 81–512 | 输出尺寸圆整倍数 (通常为8) | Round output dimensions to multiple of (usually 8) |
| method | COMBO | lanczos | 缩放算法 | Resampling method |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| mask | MASK | — |
| original_size | STRING | — |
| target_size | STRING | — |