Image Resize Mode JK๐
The tiny dropdown that steers resize strategy
- MODE
Resizing isn't one operation, it's a decision: do you squish the image to fit, crop the edges, or pad with a fill color to preserve aspect ratio? Image Resize Mode JK packages that decision as a single dropdown - Just Resize, Crop and Resize, or Resize and Fill - and outputs your choice as a MODE string. It's a parameter-holder node: zero computation, one opinionated selection, handed off to whatever resize node wants it.
In JakeUpgrade's image tooling, that string is exactly what the resize machinery consumes. The "Enhance And Resize Hint Images" node and the crop/stitch group nodes accept a resize-mode string so a workflow author can expose "how should I fit this hint image to the target" as a user-facing choice instead of a hard-coded behavior. Think of it as the named-dial version of a constant: you get a labeled, discoverable way to change resize strategy without hunting through a node's internals.
The three modes, and when each actually matters:
- Just Resize - stretch to target, ignore aspect ratio. Fast, but distorts. Fine for hint images that get overlaid or for masks; bad for anything the model "sees" directly.
- Crop and Resize - scale to cover, then crop the overflow. The choice when the full image must fill the target with no distortion, even if it means losing edges.
- Resize and Fill - scale to fit, then pad the rest. The choice when you can't afford to lose any content - inpainting and stitching workflows hate losing edges because the seam shows.
That last one is why this node earns its place: in crop-by-mask / stitch pipelines, losing pixels during a resize can break the paste-back alignment. Choosing "Resize and Fill" up front is the difference between a clean stitch and a workflow that slowly drifts.
Install. It's part of ComfyUI-JakeUpgrade:
cd ComfyUI/custom_nodes
git clone https://github.com/jakechai/ComfyUI-JakeUpgrade
cd ComfyUI-JakeUpgrade
pip install -r requirements.txt
Or ComfyUI Manager โ "JakeUpgrade". Windows portable: install.bat or ../../../python_embeded/python.exe -s -m pip install -r requirements.txt. Restart. Light deps, no model downloads.
Gotchas: the output is a plain string, so if a downstream node shows "MODE" not connected, you may have the wrong output - this node only produces the strategy name, it does not resize anything. The actual resizing happens in the node that consumes it, so a "nothing happened" report is usually a missing consumer, not this node. Pack rules: LOAD_DEPRECATED_NODES = True if JK nodes report missing, disable ComfyUI MultiGPU per the README for CUDA-error avoidance.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| resize_mode | COMBO | Just Resize | Method for resizing images |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MODE | STRING | โ |