ComfyUI Node
RulZ Resize Image Advanced
Resizes the image to the specified width and height. Size can be taken from image_1 or image_2 (use_input_size), multiplied (upscale_by) or fitted to a total pixel count (total_megapixels). All target sizes are rounded to the nearest multiple of divisible_by. The resulting output resolution is shown on the node.
RulZ Resize Image Advanced
- image_1
- image_2
- mask
- IMAGE
- width
- height
- mask
◄use_input_sizeoff►
◄width512►
◄height512►
◄upscale_modedisabled►
◄upscale_by1.00►
◄total_megapixels1.00►
◄upscale_methodlanczos►
◄keep_proportioncrop►
◄pad_color0, 0, 0►
◄crop_positioncenter►
◄divisible_by32►
◄device▾►
CategoryRulZnodes
Inputs (15)
| Name | Type | Default | Description |
|---|---|---|---|
| image_1 | IMAGE | The image that gets resized. | |
| use_input_size | COMBO | off | Use image_1's or image_2's width and height as the width/height settings (image_2 is only used for its size). Combined with divisible_by this outputs the closest valid resolution to that image. |
| width | INT | 5120–16384 | — |
| height | INT | 5120–16384 | — |
| upscale_mode | COMBO | disabled | disabled: use width/height as-is. upscale_by: multiply both edges of the target size. total_megapixels: scale the target size to the nearest total pixel count. |
| upscale_by | FLOAT | 1.000.01–100 | Edge multiplier used when upscale_mode is 'upscale_by'. |
| total_megapixels | FLOAT | 1.000.01–1000 | Target total pixel count in megapixels (1 MP = 1024*1024 px) used when upscale_mode is 'total_megapixels'. |
| upscale_method | COMBO | lanczos | 6 options: nearest-exact, bilinear, area, bicubic, lanczos, nvidia_rtx_vsr |
| keep_proportion | COMBO | crop | 8 options: stretch, resize, pad, pad_edge, pad_edge_pixel, crop, +2 |
| pad_color | STRING | 0, 0, 0 | Color to use for padding. |
| crop_position | COMBO | center | 5 options: center, top, bottom, left, right |
| divisible_by | INT | 320–512 | — |
| image_2opt | IMAGE | Optional. Only its width/height are used (when use_input_size = image_2); the output is always a resized image_1. | |
| maskopt | MASK | — | |
| deviceopt | COMBO | 2 options: cpu, gpu |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |
| width | INT | — |
| height | INT | — |
| mask | MASK | — |