Nodes/jlc-comfyui-nodes/ JLC Resize Multiple Images
ComfyUI Node

 JLC Resize Multiple Images

One resize policy, five images, zero math on your part

By Damkohler·Created 6 months ago·Updated 11 days ago· 25
 JLC Resize Multiple Images
  • image_1
  • image_2
  • image_3
  • image_4
  • image_5
  • image_1
  • image_2
  • image_3
  • image_4
  • image_5
  • batch
slot_count1
resize_byscale longer dimension
multiplier1.00
longer_size1024
shorter_size1024
width1024
height1024
megapixels1.00
scale_methodarea
divisible_by16

JLC Resize Multiple Images takes one to five IMAGE tensors, applies one shared aspect-ratio-preserving resize policy to all of them, and hands you each resized image back separately - plus a convenience batch output for the nodes that insist on one.

You reach for it when a workflow needs several reference images prepped identically: multi-reference IP-Adapter, a stack of ControlNet hint images, a batch of condition images that all have to follow the same scaling rule. Doing that with stock nodes means dropping an ImageScale node per image and keeping every widget in sync by hand; this node shares the policy once, and each input resizes from its own source geometry instead of being forced to one canvas size.

How it works

For every active input it computes target dimensions (preserving that input's own aspect ratio), rounds them to your divisible_by multiple, and resizes with ComfyUI's common_upscale using your chosen interpolation. Nothing exotic - but the details are where it earns its keep:

  • slot_count (1–5) is the master switch. Set it, press Update Visible Slots, and the frontend shows exactly that many input/output sockets. Inactive slots return None.
  • resize_by picks the policy - six options: scale by multiplier, scale longer dimension (default, 1024), scale shorter dimension, scale width, scale height, or scale total pixels (megapixels, using 1024×1024 per megapixel).
  • divisible_by (default 16) rounds width and height down to that multiple after the aspect calculation. Set to 1 to disable. This is the setting that keeps your output dims friendly to the model.
  • scale_method is your interpolation: area is generally strong for downscaling, lanczos often better for upscaling - that's the author's own guidance in the tooltip, and it matches how people actually use these in upscaling pipelines.

Outputs are image_1 through image_5, each retaining its own calculated dimensions, plus a trailing batch output. The batch follows ComfyUI's legacy ImageBatch behavior: later images are normalized to the first active result's geometry (bilinear rescale) before concatenation, and channel-count mismatches get padded with opaque values. If an upstream node deliberately outputs None at runtime, the node passes that through positionally and leaves it out of the batch.

The trap

The batch output normalizes everything to the first active image's dimensions. Feed it two images with different aspect ratios and the second one gets squashed to match. That's expected ImageBatch behavior, but it's a genuine footgun - if each image should keep its own geometry, wire the individual outputs instead and only use batch when a downstream node genuinely needs one stack. Also note divisible_by rounds down: target 1000 with the default 16 becomes 992, which surprises people who expected a clean 1000.

And it's one policy for all slots. If you need different target sizes per image, this isn't the node - the pack's single-image JLC Resize Image (or stock ImageScale) is the per-image tool.

Install

Ships in jlc-comfyui-nodes by J. L. Córdova. ComfyUI Manager finds it as "jlc-comfyui-nodes" (also on the ComfyUI Registry), or:

cd ComfyUI/custom_nodes
git clone https://github.com/Damkohler/jlc-comfyui-nodes.git

Restart ComfyUI after. No requirements.txt, no model downloads - plain ComfyUI core plus a small frontend extension for the slot visibility.

If you resize the same kind of images every session - reference crops for a multi-LoRA Flux stack, say - one node doing all five keeps the graph readable and the settings honest. It's the rare utility node that's simpler than doing it with stock parts.

Categoryutils/image

Inputs (15)

NameTypeDefaultDescription
image_1IMAGEIncoming IMAGE tensor to resize. If the upstream connected node deliberately outputs None at runtime, this node passes None through.
slot_countINT11–5Number of active image inputs and individual outputs. Press Update Visible Slots to apply the frontend socket layout.
resize_byCOMBOscale longer dimensionAspect-ratio-preserving resize policy.
multiplierFLOAT1.000.01–8Scale factor; 2.0 doubles both dimensions.
longer_sizeINT10241–16384Target size of the source image's longer edge.
shorter_sizeINT10241–16384Target size of the source image's shorter edge.
widthINT10241–16384Target width; height is calculated from aspect ratio.
heightINT10241–16384Target height; width is calculated from aspect ratio.
megapixelsFLOAT1.000.01–64Target total megapixels using 1024×1024 per megapixel.
scale_methodCOMBOareaInterpolation method. Area is generally strong for downscaling; Lanczos is often useful for upscaling.
divisible_byINT161–512After aspect-ratio calculation, round width and height down to this multiple. Use 1 to disable.
image_2optIMAGEOptional source image for active slot 2.
image_3optIMAGEOptional source image for active slot 3.
image_4optIMAGEOptional source image for active slot 4.
image_5optIMAGEOptional source image for active slot 5.

Outputs (6)

NameTypeDescription
image_1IMAGE
image_2IMAGE
image_3IMAGE
image_4IMAGE
image_5IMAGE
batchIMAGE