ImageResize
Resize to a size another node computed for you
- image
- size
- IMAGE
ComfyUI's built-in ImageResize expects you to type a width and a height into widgets, which is fine until you want that size to come from somewhere else in the graph. TeaNodes' ImageResize exists for exactly that case: its size input is a TUPLE - a single wire carrying both dimensions - so you can chain it straight off a node that computes a size for you. The author's README has a rant about exactly this: "image size always has 2 numbers, why can't it fit through a single wire?"
It's one of the ten nodes in the small ComfyUI-TeaNodes pack by TeaCrab, MIT-licensed, in the TeaNodes/Image menu.
How it works
Under the hood it's ComfyUI's own common_upscale with Lanczos resampling and center cropping - the same quality path core nodes use, so there's no quality penalty for going through a custom node. The quirk worth understanding is the override logic: if the size tuple is wired and it isn't the default (1024, 1024), the tuple wins and the width/height widgets are ignored. If size is left unwired (or wired to exactly the default), the widgets take over. So it behaves like a resize node with two personalities, and it's usually obvious which one you're in.
The inputs that matter
image- what you're resizing.size- the TUPLE. Wire this from TC_SizeApproximation (its natural partner) or anything else that emits aTUPLE, and the widgets go quiet.width/height- the fallback widgets,INT, 512–4096 in steps of 32.
A handy side effect of the tuple path: it skips the widget clamps. The widgets refuse to go below 512, but a wired tuple can carry any size, including a small one, because that branch does no validation. Want a 320×320 intermediate? Compute it, wire it, done.
Output is the resized IMAGE. Feed it into VAEEncode for img2img, into a latent, or into anything downstream that wants a known resolution.
When you'd reach for it
Pair it with TC_SizeApproximation for the classic img2img speed stabilizer: approximate a size that keeps your image's ratio but fixes the total pixel count, then resize to it so every run costs about the same time regardless of source resolution. Or use it anywhere a workflow hands you a computed size and you want to obey it without typing.
Installing it
ComfyUI Manager → search ComfyUI-TeaNodes, or:
cd ComfyUI/custom_nodes
git clone https://github.com/TeaCrab/ComfyUI-TeaNodes
restart ComfyUI. No model downloads; the pack's only declared dependency is the author's regex_spm helper.
Honestly, if you never resize to a computed size, core's node is fine and you can skip this. But the moment you want "whatever SizeApproximation says" in a workflow, this is the node that makes it a one-wire connection instead of a widget-juggling detour.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| size | TUPLE | 1024,1024 | — |
| width | INT | 1024512–4096 | — |
| height | INT | 1024512–4096 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |