Nodes/S42 CutFlow/↔ S42 CutFlow Batch Resize
ComfyUI Node

↔ S42 CutFlow Batch Resize

Resize a whole video clip five different ways, with the interpolation you actually want

By GeekyGhost·Created 6 months ago·Updated 4 months ago· 3
↔ S42 CutFlow Batch Resize
  • clip
  • clip
  • frame_count
  • info
modeexact
width512
height512
percentage50
max_dim1024
interpolationbilinear

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) - force width × 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: set height to 1920 and let width follow.
  • percentage - scale by percentage (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 equals max_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.

CategoryS42 CutFlow/Utilities

Inputs (7)

NameTypeDefaultDescription
clipIMAGEVideo clip to resize.
modeCOMBOexact'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.
widthINT5128–8192Target width (exact, fit_width modes).
heightINT5128–8192Target height (exact, fit_height modes).
percentageFLOAT501–400Scale percentage (percentage mode). 50 = half size, 200 = double.
max_dimINT102464–8192Max dimension for longest side (max_dimension mode).
interpolationCOMBObilinearResize interpolation method. 'bilinear' = smooth (default). 'nearest' = pixel-art safe. 'bicubic'/'lanczos' = high quality (uses PIL).

Outputs (3)

NameTypeDescription
clipIMAGE
frame_countINT
infoSTRING