Nodes/ComfyUI-ReplenishNodes/Reference Resize
ComfyUI Node

Reference Resize

Conform a batch of images to another image's size

By hben35096·Created 2 years ago·Updated about a year ago· 8
Reference Resize
  • reference_image
  • images
  • images

Two inputs, one output, no dials. Reference Resize takes a batch of images and resizes all of them to match the pixel dimensions of a separate reference image. That's the whole node: no width/height fields to type in, no interpolation dropdown, no crop-vs-pad choice. You wire in the size you want as an image, and everything else conforms to it.

That's a narrower job than a general-purpose resize node, and it's narrow on purpose. The pack this ships in, ComfyUI-ReplenishNodes, exists as a set of small companion nodes for building comparison grids - the author's own README frames the whole repo around XY-plot workflows, pointing at qq-nodes-comfyui, images-grid-comfy-plugin and Impact-Pack as what you actually need alongside it. Grid-assembly nodes tile a batch of images into one picture, and tiling only works cleanly if every tile is the same size. If you're sweeping a parameter - different seeds, different checkpoints, different LoRA strengths - your outputs can drift in size depending on what upstream node produced them, especially once aspect-ratio or resolution nodes are in the mix. Reference Resize is the node you drop right before the grid step to force everything back to one shape, using one of your own images as the size to match instead of you having to go read its width and height and type the numbers in by hand.

How it works

It reads the width and height off reference_image and resizes every image in images to match those pixel dimensions. The exact resampling method isn't exposed as a setting - there's nothing to configure, which is the tradeoff for the node being this small. If you need control over aspect-ratio handling (stretch vs. crop vs. pad) or a specific interpolation algorithm, that's a job for a fuller resize node like ComfyUI Essentials' Image Resize, not this one. What this node buys you instead is convenience: point it at any image already in your graph and skip typing numbers entirely.

The inputs and outputs that matter

  • reference_image - the image whose width and height become the target size. Doesn't need to be part of the batch you're resizing; it's purely a size reference, wire in anything.
  • images - the batch to resize. Can be a single image or a full batch; every one gets conformed to the reference's dimensions.

The single output, images, is your batch at the new size - wire it straight into whatever grid, save, or compare node needs everything uniform.

How to install it

Via ComfyUI Manager: Install Custom Nodes, search ComfyUI-ReplenishNodes, install, restart. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/hben35096/ComfyUI-ReplenishNodes

then restart ComfyUI. The node itself is plain image-tensor math - no models to download, no heavy dependencies. The pack's README is mostly about what else you need around it: if you're building the XY-grid workflow this pack was made for, you'll also want qq-nodes-comfyui, images-grid-comfy-plugin, and ComfyUI-Impact-Pack installed alongside it, since ReplenishNodes is explicitly a set of secondary/helper nodes for those, not a standalone workflow.

Common issues & troubleshooting

Node doesn't appear after install. Confirm the folder under custom_nodes is named ComfyUI-ReplenishNodes (not -main from a manual zip download) and do a full restart, not just a browser refresh.

Images still come out different sizes downstream. Check you're actually resizing the right batch - Reference Resize outputs a new images tensor, it doesn't modify anything in place, so if a later node is still pulling from the original un-resized source, wire it from this node's output instead.

A grid or plot node further downstream still errors on mismatched images. Reference Resize fixes dimension mismatches, not channel mismatches - if some of your images are RGBA and others RGB, you'll still get a shape error after resizing. This pack ships a companion node for exactly that (To RGB), and running both before the grid step is the reliable combo.

Looking for the CLIPSeg-related node from this pack and not finding it. The README notes CLIPSeg To Mask was removed; use "CLIPSeg Masking" from was-node-suite-comfyui instead. Unrelated to Reference Resize, but worth knowing if you installed this pack expecting it.

CategoryReplenish/Image

Inputs (2)

NameTypeDefaultDescription
reference_imageIMAGE
imagesIMAGE

Outputs (1)

NameTypeDescription
imagesIMAGE