Nodes/ComfyUI-CraftKit/Smart Resolution Multiplier πŸ“
ComfyUI Node

Smart Resolution Multiplier πŸ“

The three-output node that makes SeedVR2 fit a workflow

By CraftopiaStudioΒ·Created 6 months agoΒ·Updated about 21 hours agoΒ· 2
Smart Resolution Multiplier πŸ“
  • image
  • width
  • height
  • resolution
β—„multiplier2.0β–Ί
β—„multiple_of8β–Ί

SeedVR2 is the community's default image upscaler right now, and it has an input quirk: it wants a single resolution INT - the longest side - not width and height separately. ComfyUI's standard math nodes hand you FLOATs, or force you through two or three hops to compute the longest edge. Smart Resolution Multiplier exists to collapse that into one node: give it an image and a multiplier, and out come width, height, and resolution as clean INTs, ready to plug straight into SeedVR2's input.

It's from ComfyUI-CraftKit, the same pack that ships Smart Resize for bringing upscaled results back down to training size. That's the intended dance, and it's a good one: compute a dynamic target from the source, upscale to it with SeedVR2, then Smart Resize pulls the result back to your LoRA training resolution. No hardcoded sizes anywhere.

How it works

Boring in the best way. It reads the image tensor's shape directly - image.shape[1] and image.shape[2] - so there's no separate Get Image Size node in your graph. It multiplies both dimensions by the factor, rounds, then snaps to a multiple of multiple_of (8 by default, for SD/Flux compatibility). resolution is just max(width, height). It's pure math on a few integers: no VRAM cost, no image processing, nothing to break.

It's also genuinely useful for LoRA dataset prep, which is the pack's home turf. Training on mixed resolutions generally beats a single fixed size, and this node makes it easy to compute a per-image target instead of hardcoding one number for the whole dataset.

The inputs that matter

There are only three, and two are basically set-and-forget:

  • Image - the source. Its current dimensions are read automatically.
  • Multiplier - FLOAT, default 2.0, range 0.1 to 16. 2.0 doubles resolution; anything under 1.0 shrinks.
  • Multiple of - the snap factor. 8 is the default and the right one for most pipelines.

Outputs: width and height (INTs, wire them anywhere you'd feed explicit dimensions) and resolution (the longest side as INT, into SeedVR2).

Installing it

ComfyUI Manager: search for ComfyUI-CraftKit. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/CraftopiaStudio/ComfyUI-CraftKit

Restart ComfyUI and it's under CraftKit. No extra dependencies - it's plain PyTorch math, and everything it needs ships with ComfyUI.

Things to know

  • resolution is the longest side after snapping. On a portrait image that's the height, not the width. If you need an exact 2x, the multiple_of rounding can nudge a side by a few pixels - fine for upscaling, worth knowing if you're feeding a strict training target.
  • It only computes numbers. It doesn't resize anything itself. You still wire its outputs into SeedVR2 or whatever consumes them. That's the point, but people do occasionally expect magic.
  • The multiplier default of 2.0 is aggressive for a SeedVR2 pass if you're upscaling from an already-large base - the community's own advice is often to pre-downscale soft sources first (Comfy Org's handbook recommends dropping to about 0.35MP before the upscale), so don't be afraid to pair this with a downscale step upstream.

It's a one-trick node, and the trick is exactly the one the SeedVR2 workflow was missing. Ten seconds to add, saves you a whole sub-graph.

CategoryCraftKit

Inputs (3)

NameTypeDefaultDescription
imageIMAGESource image. Its current width/height are read directly, no separate Get Image Size node needed.
multiplierFLOAT2.00.1–16Multiply width and height by this factor. E.g. 2.0 = double resolution.
multiple_ofINT81–64Snap output dimensions to a multiple of this value.

Outputs (3)

NameTypeDescription
widthINTβ€”
heightINTβ€”
resolutionINTβ€”