ComfyUI Node
🐇 Batch Resize w/ Lanczos
CUDA-accelerated, gamma-correct Lanczos resizer (TorchLanc). Modes: • Keep AR • Stretch • Crop (Cover + Crop) • Pad (Fit + Pad) • AR Scale + Divisible Crop Node functionality based on Resize nodes by Kijai More from me!: https://artificialsweetener.ai
🐇 Batch Resize w/ Lanczos
- image
- mask
- IMAGE
- width
- height
- mask
◄width1024►
◄height576►
◄resize_modeKeep AR►
◄divisible_by1►
◄max_batch_size0►
◄sinc_window3►
◄pad_color0, 0, 0►
◄crop_positioncenter►
◄precisionfp32►
Categoryimage/resize
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | Input batch (B,H,W,C) in [0,1] float. Processed on GPU. | |
| width | INT | 10241–16384 | Target width (pixels). Notes: • Keep AR / Pad: maximum width for the fit • Crop: final output width • AR Scale + Divisible Crop: requested width before divisibility |
| height | INT | 5761–16384 | Target height (pixels). Notes: • Keep AR / Pad: maximum height for the fit • Crop: final output height • AR Scale + Divisible Crop: requested height before divisibility |
| resize_mode | COMBO | Keep AR | Modes: - Keep AR: Fit inside width×height (preserve aspect) - Stretch: Force to width×height (may distort) - Crop (Cover + Crop): Scale to cover, then crop to width×height - Pad (Fit + Pad): Fit inside, then pad to width×height - AR Scale + Divisible Crop: Scale by SOURCE long side to ≤ requested divisible; crop ONLY the short side to its divisible |
| divisible_by | INT | 11–4096 | Force output dimensions to multiples of N. Details: • Keep AR: Fit → then step down to the largest size ≤ requested that keeps AR AND makes both sides divisible • AR Scale + Divisible Crop: Lock the scaled LONG side to its divisible target; crop ONLY the short side to its divisible Set to 1 (or 0 in UI) to disable |
| max_batch_size | INT | 00–4096 | 0 = process whole batch >0 = chunk the batch to this size |
| sinc_window | INT | 31–8 | Lanczos window size (a). Higher = sharper (more ringing). |
| pad_color | STRING | 0, 0, 0 | Pad mode only. RGB as 'r, g, b' (0-255). |
| crop_position | COMBO | center | Where to crop/pad from. Choose which edges are preserved for cropping, or where padding is added. |
| precision | COMBO | fp32 | Resampling compute dtype. |
| maskopt | MASK | Optional mask (B,H,W) in [0,1]. Resized with nearest. Follows the same crop/pad as the image. |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |
| width | INT | — |
| height | INT | — |
| mask | MASK | — |