Image Resize Batch Safe (IAMCCS)
KJ-style resize without the RAM spike at the end
- image
- mask
- IMAGE
- width
- height
- mask
The author's own description is the best review of this node: "Batch-safe IMAGE resize for IAMCCS workflows. Mirrors the KJ resize modes used in IAMCCS flows without the final concat RAM spike." If you've used Kijai's resize nodes - and in the video world, you basically have - you know the modes: stretch, pad, crop, pillarbox-blur, total-pixels. This node reimplements that family of behaviors but resizes the whole batch in one go instead of looping image-by-image and concatenating at the end, which is where those Kijai-style resizers blow up system RAM on long video batches.
So the pitch is simple: you get the resize modes you're used to, minus the memory cliff.
How it works
image in, width/height out (plus the resized IMAGE). The geometry controls mirror the KJ API:
upscale_method- nearest-exact, bilinear, area, bicubic, lanczos.keep_proportion- the mode that decides how it fills the target box:stretch,resize,pad,pad_edge,pad_edge_pixel,crop,pillarbox_blur, ortotal_pixels.cropis the default, and it's what most video pipelines want - fill the frame, cut the overflow.pad_color-"0, 0, 0"by default (RGB comma-separated), used by the pad modes.crop_position- center/top/bottom/left/right, for when you don't want the center crop.divisible_by- rounds output to a multiple (default 2, bump to 8/16 for latent-friendly sizes).
There's also an optional mask input that comes out the other side, resized to match - handy when you're resizing image + mask together and don't want them to drift. And device defaults to cpu, which is the right call: resizing a big batch on the GPU steals time and VRAM for zero benefit. Leave it unless you have a reason.
Outputs: IMAGE, width, height, and mask.
Why you'd reach for it
Any workflow that resizes long frame batches - LTX-2 segment prep, source-frame loading, feeding frames into a video pipeline at a fixed size. If you've ever watched ComfyUI sit there spinning on a 500-frame concat after a resize, you know exactly why "safe" is in the name.
Install
Part of IAMCCS-nodes:
cd ComfyUI/custom_nodes
git clone https://github.com/IAMCCS/IAMCCS-nodes.git
or ComfyUI Manager → search IAMCCS, then restart. No dependencies to add.
The honest take
If your batches are small (a handful of images), this buys you nothing over stock resizers. The moment your batch is hundreds of frames, though, the RAM behavior genuinely matters - this is one of those nodes you install for the long run and forget about until the day it saves you from a 10-minute stall.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| width | INT | 5120–16384 | — |
| height | INT | 5120–16384 | — |
| upscale_method | COMBO | 5 options: nearest-exact, bilinear, area, bicubic, lanczos | |
| keep_proportion | COMBO | crop | 8 options: stretch, resize, pad, pad_edge, pad_edge_pixel, crop, +2 |
| pad_color | STRING | 0, 0, 0 | — |
| crop_position | COMBO | center | 5 options: center, top, bottom, left, right |
| divisible_by | INT | 20–512 | — |
| maskopt | MASK | — | |
| deviceopt | COMBO | cpu | 2 options: cpu, gpu |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |
| width | INT | — |
| height | INT | — |
| mask | MASK | — |