Nodes/DOGMA Nodes/DOGMA Resize To Reference Scale v14
ComfyUI Node

DOGMA Resize To Reference Scale v14

Pin your working master to an exact 2x

By axior·Created 4 months ago·Updated 3 days ago· 1
DOGMA Resize To Reference Scale v14
  • image
  • reference
  • image
  • info
scale2.00

Upscale pipelines drift. You start with a 1024px source, run a 4x pixel upscaler, feed the result into a refiner that resizes to whatever it thinks is reasonable, and now your "2x master" is 2016x3024 - not 2x anything. Every downstream crop, mask and composite inherits that awkward number, and the arithmetic gets harder at every step.

Resize To Reference Scale v14 fixes the anchor. It resizes an image to a scale multiple of another image's dimensions, so you can say "make this exactly twice the original" and have it be true.

How it works

You give it the image to resize, a reference image, and a scale (default 2.0, range 0.25–8.0 in 0.05 steps). It reads the reference's height and width, multiplies by the scale, rounds each dimension to the nearest multiple of 16, and resizes your image to that with bicubic interpolation, antialiasing on.

That 16 is not arbitrary. Flux and Flux 2 latents are 8x-compressed with a further spatial packing, and the pack's own crop code carries the comment that Flux 2 latent dimensions must be divisible by 16 - the same constraint appears in most of these nodes' alignment math. Feed a model a 2032x3056 and it will pad or truncate internally and you'll find the junk at the edges.

The info output spells out what happened: target size, reference size, scale. Read it once and you'll never mis-wire this node again.

Inputs and outputs

image, reference (IMAGE each) and scale (FLOAT, default 2.0). Outputs image plus the info string. Note what's not there: no interpolation mode, no crop/fit/pad choice, no "keep aspect". It always keeps the reference's aspect, by construction.

Why you'd use this over a plain ImageScale

A plain scale node takes a target in pixels. That's fine when you know the number and fragile when you don't - the number you want is derived from the original source, and the original source is three nodes upstream behind a downscale that may or may not have been applied. Wiring the reference instead of a number means the master can't drift when you change something upstream. That's the whole value proposition: a declaration ("2x the source") rather than a constant.

The typical slot is after the pixel upscaler and before the semantic pass, so every crop, mask and stitch in the rest of the graph works in a frame that is a clean multiple of the source.

The trap

scale is relative to the reference, not to the image you're feeding it. If you wire the wrong reference - the previous stage's output instead of the original - you get a plausible-looking result at the wrong size, and nothing errors. The info output exists so you can check: it prints all three numbers. Also worth knowing, it will happily downscale (scale below 1.0), and bicubic-downscaling an already-processed image is a lossy operation you probably didn't intend.

And do not expect this to be a quality upscaler. It's bicubic. If you need detail invented, that's the whole rest of the graph's job.

Install

Manager → search DOGMA Nodes → install → restart. Or from the command line:

cd ComfyUI/custom_nodes
git clone https://github.com/axior/ComfyUI-DOGMA-Nodes

The pack declares no Python dependencies at all and downloads nothing - this node is torch interpolation plus arithmetic. It appeared in the pack's 1.0.4 release alongside the other DOGMA/Semantic Detailer nodes, which is why the category reads that way rather than anything upscaler-flavoured.

One practical note on the pack as a whole: it keeps every historical generation of a node registered side by side. Type "reference" into the node search and you'll get this node next to DOGMACenterCropToReferenceScaleV23, which crops to a reference multiple instead of resizing to one. They do different things and the names barely say so. Pick deliberately - the node search shows you the whole family tree, not just the leaf.

CategoryDOGMA/Semantic Detailer

Inputs (3)

NameTypeDefaultDescription
imageIMAGE
referenceIMAGE
scaleFLOAT2.000.25–8

Outputs (2)

NameTypeDescription
imageIMAGE
infoSTRING