Light-Tool: Resize Image By Min Size
The \"make sure it's big enough\" resize node that only scales up
- image
- image
Most resize nodes let you shrink things. This one's the opposite: it only makes an image bigger, and it never touches an image that's already big enough. If a downstream step in your workflow grumbles about a minimum resolution, this is the node that shuts it up.
What it actually does
You give it min_width and min_height (both default to 512, range 0–8192) and it scales your image up proportionally so that both dimensions land at least on those floors. It's a pure upscaler in the geometric sense - no model, no hallucinated detail, just a resize() call. If the image already meets both minimums, it's returned untouched. That guard is the whole point: it can't accidentally blow a 1024px image up to a bigger one you didn't ask for.
One quirk to internalize: the scale factor is driven by whichever dimension is furthest below its target (ratio = max(min_width/w, min_height/h)). So a 2000×300 portrait with min_height=512 barely moves, while a wide 3000×1000 panorama gets scaled way up by its height. That's the correct behavior for "guarantee a floor" - just know the taller/thinner your source, the more aggressive the upscale.
You get four resize_method options (LANCZOS, BICUBIC, NEAREST, BILINEAR; LANCZOS is default and the right call for photographic upscales) and a mode pick between RGB, RGBA, and L (grayscale). The mode conversion happens before the resize, so you can force a flattened RGB or an alpha-preserving RGBA output in one go.
Where it fits in a workflow
ComfyUI's stock resizers assume you know the target size. This node is for the "I don't care about the exact number, just don't let it fall under this" case - prepping an image for a model that wants at least 512px on a side, or bumping a small reference up before it enters an img2img pass. It slots right after your image source and before the VAE encode; it's cheap, deterministic, and returns the same IMAGE tensor type every other node expects.
It pairs nicely with the rest of this pack: drop a Safe Image Crop after it to knock the result back down to a multiple of 64, and your latent space stays happy.
Installing it
This ships in ComfyUI-Light-Tool, a small utility pack by Hmily. In ComfyUI Manager, search "ComfyUI-Light-Tool" and install, or:
cd ComfyUI/custom_nodes
git clone https://github.com/ihmily/ComfyUI-Light-Tool
pip install -r requirements.txt
# restart ComfyUI
No model files, no API keys. It does pull opencv-python and oss2 with the pack even if you never use them, which is why the install takes a moment longer than a pure-Pillow node.
Where people get burned
- It never downscales. Expecting "min size" to also cap your image? Use the pack's Resize Image By Max Size sibling instead - that's the ceiling version.
- Very non-square sources surprise you. Remember it's a floor on both axes, so an extreme aspect ratio can upscale more than you'd guess. Check the output size on the node before wiring it into a VRAM-sensitive step.
- It's not a detail upscaler. This just adds pixels via interpolation; it won't invent texture. If you want a model-driven upscale that adds real detail, look at the ESRGAN/Ultimate SD Upscale lineage instead (see the upscaling notes in the KB) - this node is the cheap, fast, "make it bigger" option, and that's a feature, not a bug.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| min_width | INT | 5120–8192 | — |
| min_height | INT | 5120–8192 | — |
| resize_method | COMBO | LANCZOS | 4 options: LANCZOS, BICUBIC, NEAREST, BILINEAR |
| mode | COMBO | RGB | 3 options: RGB, RGBA, L |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |