Nodes/RulZnodes/RulZ Resize Image Advanced
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.

By speedyrulz·Created about a month ago·Updated a day ago· 1
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)

NameTypeDefaultDescription
image_1IMAGEThe image that gets resized.
use_input_sizeCOMBOoffUse 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.
widthINT5120–16384—
heightINT5120–16384—
upscale_modeCOMBOdisableddisabled: 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_byFLOAT1.000.01–100Edge multiplier used when upscale_mode is 'upscale_by'.
total_megapixelsFLOAT1.000.01–1000Target total pixel count in megapixels (1 MP = 1024*1024 px) used when upscale_mode is 'total_megapixels'.
upscale_methodCOMBOlanczos6 options: nearest-exact, bilinear, area, bicubic, lanczos, nvidia_rtx_vsr
keep_proportionCOMBOcrop8 options: stretch, resize, pad, pad_edge, pad_edge_pixel, crop, +2
pad_colorSTRING0, 0, 0Color to use for padding.
crop_positionCOMBOcenter5 options: center, top, bottom, left, right
divisible_byINT320–512—
image_2optIMAGEOptional. Only its width/height are used (when use_input_size = image_2); the output is always a resized image_1.
maskoptMASK—
deviceoptCOMBO2 options: cpu, gpu

Outputs (4)

NameTypeDescription
IMAGEIMAGE—
widthINT—
heightINT—
maskMASK—