Resize Image With Resolution If Smaller
Upscale-only, skip if already big enough
- image
- IMAGE
Same idea as ResizeImageResolution, but conditional. It only resizes the image if it's smaller than the target resolution. Already big enough? It passes straight through, untouched. This is the "bring small images up to a floor, leave everything else alone" node.
The value is in the skip. In a batch of mixed-size inputs, you often want to guarantee a minimum size without needlessly shrinking or re-interpolating the images that already clear the bar. Every resize is a lossy interpolation, so touching an image that doesn't need it just softens it for no reason. This node avoids that: it enforces a lower bound and otherwise keeps its hands off.
How it works
It checks the incoming image against your resolution target. If the image is below it, the node scales it up proportionally (aspect ratio kept) to meet the floor. If it's at or above, the image comes out exactly as it went in. One branch, no config beyond the threshold.
Keep in mind this is interpolation-based enlargement - when it does resize a small image up, it's stretching existing pixels, not adding detail. If you need genuine detail on undersized inputs, follow this with a model upscaler. This node's job is guaranteeing a minimum footprint, not enhancing.
The inputs that matter
- resolution (default 512) - the floor. Images below this get scaled up to it; images above are left alone.
- method -
LANCZOS,BICUBIC, orNEAREST.LANCZOSfor photographic content,NEARESTfor masks or pixel art.
image in, one IMAGE out - resized only if it needed it.
The pair it belongs to
This has a mirror-image sibling, ResizeImageResolutionIfBigger, which does the opposite: it only shrinks images that are too large and leaves small ones alone. Between the two you can clamp a batch to a range - floor with this node, ceiling with that one - which is a genuinely useful pattern when you're feeding a model that has both a minimum useful size and a memory ceiling.
Installing ComfyUI-LogicUtils
ComfyUI Manager: Install Custom Nodes → search "ComfyUI-LogicUtils" → install → restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/aria1th/ComfyUI-LogicUtils
Restart ComfyUI. No dependencies.
Worth knowing
LogicUtils is aria1th's (AngelBottomless) utility grab-bag, undocumented by the author's own admission - the kind of pack where the conditional resize nodes exist because the person actually processed large, messy image sets and got tired of over-resizing things that were already fine. The behavior is exactly what the name says: resize if smaller, otherwise pass through.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| resolution | INT | 512 | — |
| method | COMBO | 3 options: NEAREST, LANCZOS, BICUBIC |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |