Load & Resize Image
Load a file and size it to your model's happy place
- IMAGE
- MASK
- filename
- cleaned filename
- width
- height
Stock ComfyUI's Load Image has one job: load a file. AUNImageLoadResize loads the file and resizes it to whatever your model actually wants, in one step - which sounds like a small thing until you've done the load-then-resize-then-load-again dance for the hundredth time. It's the pack's img2img workhorse.
The image input is the standard upload/select widget. Then a big boolean - resize (default off) - switches the resizing machinery on. When it's on, you pick a method from four strategies: stretch (squash to exact width/height, aspect ratio be damned), keep proportion (fit within the box, preserving ratio - the default), fill / crop (scale to cover then crop to the box, with crop_position anchoring the crop to center, left, right, top, or bottom), and pad (fit inside with letterbox padding). interpolation offers the usual six filters (nearest, bilinear, bicubic, area, nearest-exact, lanczos), and lanczos is the default because it's the safe quality choice for downscales.
The FramePack feature is what makes this node stand out. Flip use_framepack_bucket on and the node ignores your literal width/height and instead snaps to the nearest FramePack bucket - the same aspect-ratio bins the FramePack video workflow uses (960x416 up through 768x512, 512x768 and the like) - scaled to base_resolution. Set base_resolution to 640 and you get the original FramePack sizing; raise it to scale everything up proportionally. That's a huge time-saver if you're prepping frames for a FramePack or Hunyuan-based video workflow where bucket-respecting sizes are the difference between smooth generation and wasted VRAM, and it's a good way to make img2img inputs land on a "nice" resolution even when you're not doing video.
The outputs cover both worlds. IMAGE and MASK (the alpha mask, resized along with the image) go to your sampler or encoder. filename and cleaned filename give you the original file's name (and a word-limited, symbol-cleaned version via max_num_words - set 0 for no limit) for filenames or prompts. And width/height report the actual output dimensions as INTs, which is the honest number to put in a filename when the resize math did something non-obvious.
Install with the pack: ComfyUI Manager (search "AUN") or cd ComfyUI/custom_nodes && git clone https://github.com/loz2754/AUN-ComfyUI-Nodes, then restart. The pack's requirements pull in opencv-python-headless for the image work; if you cloned manually and see ModuleNotFoundError: cv2, pip install -r custom_nodes/AUN-ComfyUI-Nodes/requirements.txt. No models to download. If your image already lives in the graph, skip the loading and use the sibling AUNImageResize - same strategies, no file I/O.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| image | COMBO | Select image file from input directory or upload new image. | |
| resize | BOOLEAN | false | Enable automatic resizing to specified dimensions. Maintains aspect ratio. |
| use_framepack_bucket | BOOLEAN | false | If enabled (with resize), choose nearest FramePack bucket based on aspect ratio and base resolution. |
| base_resolution | INT | 640320–2048 | Base resolution for bucket scaling. 640 matches original; higher scales proportionally. |
| width | INT | 5120–2048 | Target width for resizing (8-pixel increments). Only used if resize is enabled. |
| height | INT | 5120–2048 | Target height for resizing (8-pixel increments). Only used if resize is enabled. |
| method | COMBO | keep proportion | Resize strategy: stretch to exact size, keep aspect ratio, fill then crop, or pad to fit. |
| crop_position | COMBO | center | When using fill / crop, choose which edge or center anchors the crop window. |
| interpolation | COMBO | lanczos | Interpolation filter used during resizing. |
| max_num_words | INT | 00–32 | Maximum number of words to keep for both filename outputs. Set to 0 for no limit. |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |
| MASK | MASK | — |
| filename | STRING | — |
| cleaned filename | STRING | — |
| width | INT | — |
| height | INT | — |