ComfyUI Node
Easy Resize (Koolook)
Resize an image to a target aspect ratio and model-friendly divisible size. Use stretch, letterbox, or pillarbox; optional masks can produce a composed image, inverted mask, color panel, and final/original size outputs.
Easy Resize (Koolook)
- image
- mask
- IMAGE
- composed_IMAGE
- MASK
- inverted_MASK
- width
- height
- COLOR_PANEL
- original_width
- original_height
- original_aspect_ratio
◄base_onWidth►
◄base_size512►
◄aspect_ratio16:9►
◄divisible_by32►
◄upscale_methodnearest-exact►
◄keep_proportionstretch►
◄crop_positioncenter►
◄pad_color_modeBlack►
◄panel_color_modeBlack►
◄devicecpu►
◄pad_color0, 0, 0►
◄panel_color0, 0, 0►
◄invert_composed_MASKfalse►
CategoryKoolook/Image
Inputs (15)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| base_on | COMBO | Width | Choose which target dimension is driven by base_size; the other is computed from aspect_ratio. |
| base_size | INT | 5121–16384 | Target width or height before snapping to divisible_by. |
| aspect_ratio | STRING | 16:9 | Target ratio as W:H, e.g. 16:9, 1:1, or 9:16. |
| divisible_by | INT | 321–128 | Snap final width and height to a multiple; use the model's latent/grid requirement. |
| upscale_method | COMBO | nearest-exact | ComfyUI resize filter used for the image and mask. |
| keep_proportion | COMBO | stretch | stretch fills the target exactly; letterbox/pillarbox preserve proportions and add bars. |
| crop_position | COMBO | center | Placement of the preserved image when bars are added. Top/bottom affect letterbox; left/right affect pillarbox. |
| pad_color_mode | COMBO | Black | Color for letterbox/pillarbox bars. Custom reads pad_color. |
| panel_color_mode | COMBO | Black | Color for COLOR_PANEL and masked composed_IMAGE background. Custom reads panel_color. |
| device | COMBO | cpu | Device used for resize/composite tensors. |
| maskopt | MASK | — | |
| pad_coloropt | STRING | 0, 0, 0 | Custom RGB bar color in 0..1 floats, e.g. 0, 0, 0 or 1, 0.5, 0. |
| panel_coloropt | STRING | 0, 0, 0 | Custom RGB color for COLOR_PANEL and mask composition background. |
| invert_composed_MASKopt | BOOLEAN | false | Flip which side of the resized mask shows IMAGE vs COLOR_PANEL in composed_IMAGE. |
Outputs (10)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |
| composed_IMAGE | IMAGE | — |
| MASK | MASK | — |
| inverted_MASK | MASK | — |
| width | INT | — |
| height | INT | — |
| COLOR_PANEL | IMAGE | — |
| original_width | INT | — |
| original_height | INT | — |
| original_aspect_ratio | STRING | — |