↔ S42 CutFlow Batch Resize
Resize a whole video clip five different ways, with the interpolation you actually want
- clip
- clip
- frame_count
- info
Every AI video pipeline hits the moment where the output resolution is wrong for what's next: too small to deliver, too big to process cheaply, or just inconsistent between clips that need to composite together. S42CF Batch Resize is the pack's answer - one node that resizes the whole IMAGE batch, with a mode dropdown covering the five ways people actually think about size, and honest control over interpolation.
The modes, because picking the right one is half the job:
exact(default) - forcewidth×height. The blunt instrument; it distorts if your aspect ratio changes. Fine for standardizing dimensions before compositing.fit_width- set the width, height scales to keep aspect. For "I need 1080 wide, whatever height that makes."fit_height- the vertical twin. This is your 9:16 output mode: setheightto 1920 and let width follow.percentage- scale bypercentage(50 = half, 200 = double). The fast-iteration mode: drop your whole clip to 50% for testing, flip to 100 for the final pass. Pairs naturally with the pack's Quick Preview philosophy.max_dimension- scale so the longest side equalsmax_dim. The safe normalizer: "make everything fit under 1024 on its long edge" is the classic input for models with strict resolution limits.
Then interpolation, which matters more than people think:
bilinear(default) - smooth, the everyday choice.nearest- the pixel-art safe option; no smoothing, so edges stay hard. Wrong for video, right for sprites and masks.bicubic/lanczos- the high-quality pair, routed through PIL. Lanczos is the sharpest and is what you want when the resize is the final step before delivery; bicubic is nearly as good and a hair faster.
Outputs are clip (resized IMAGE batch), frame_count, and info - the same output shape as most S42-CutFlow utilities, so it drops into the same spots in a graph.
The mechanism is a straightforward tensor resize per frame - PIL-backed for the high-quality modes, torch for the fast ones. Deterministic, CPU-cheap, no model. Like everything in the pack, it runs on standard IMAGE batches, so it slots between any loader and any downstream node.
The practical take: don't default to exact unless you mean it. Most of the time you want fit_height (vertical delivery), max_dimension (feeding a model), or percentage (iterating). And when the resize is the last thing before the final render, spend the tiny bit of extra time on lanczos - for upscaling it's visibly better than bilinear, and the whole point of post-processing is that the output is what the viewer sees.
Installing it
S42-CutFlow install: ComfyUI Manager → search "S42 CutFlow" → Install → restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/GeekyGhost/S42-CutFlow.git
pip install -r S42-CutFlow/requirements.txt
One-line requirements (opencv-python-headless); torch and Pillow (both bundled) do the resizing. "[S42 CutFlow] Loaded ..." on restart confirms the pack.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| clip | IMAGE | Video clip to resize. | |
| mode | COMBO | exact | 'exact' = resize to exact width x height. 'fit_width' = set width, height scales proportionally. 'fit_height' = set height, width scales. 'percentage' = scale by percentage. 'max_dimension' = scale so longest side = max_dim. |
| width | INT | 5128–8192 | Target width (exact, fit_width modes). |
| height | INT | 5128–8192 | Target height (exact, fit_height modes). |
| percentage | FLOAT | 501–400 | Scale percentage (percentage mode). 50 = half size, 200 = double. |
| max_dim | INT | 102464–8192 | Max dimension for longest side (max_dimension mode). |
| interpolation | COMBO | bilinear | Resize interpolation method. 'bilinear' = smooth (default). 'nearest' = pixel-art safe. 'bicubic'/'lanczos' = high quality (uses PIL). |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| clip | IMAGE | — |
| frame_count | INT | — |
| info | STRING | — |