Nodes/XB_ToolBox/XB-BOX - ๐Ÿ“ ๆ‰น้‡็ผฉๆ”พๅ›พๅƒ
ComfyUI Node

XB-BOX - ๐Ÿ“ ๆ‰น้‡็ผฉๆ”พๅ›พๅƒ

Scale up to nine images at once with one shared setting

By wjluoxiaoยทCreated 7 months agoยทUpdated a day agoยท 406
XB-BOX - ๐Ÿ“ ๆ‰น้‡็ผฉๆ”พๅ›พๅƒ
  • image1
  • ๅ›พๅƒ1
  • ๅ›พๅƒ2
  • ๅ›พๅƒ3
  • ๅ›พๅƒ4
  • ๅ›พๅƒ5
  • ๅ›พๅƒ6
  • ๅ›พๅƒ7
  • ๅ›พๅƒ8
  • ๅ›พๅƒ9
โ—„upscale_methodโ–พโ–บ
โ—„width512โ–บ
โ—„height512โ–บ
โ—„cropโ–พโ–บ

XB_ImageScale is a batch wrapper around ComfyUI's stock ImageScale, and the pitch is in the name: instead of dropping one ImageScale per image, you feed it up to nine images and it resizes them all with the same method, width, height, and crop settings. Set it once, apply to everything, and all nine come out the back door in lockstep.

This is one of those quiet utility nodes you don't appreciate until a workflow hands you a batch of frames or a grid of reference images that all need identical treatment. Feeding nine separate ImageScale nodes nine copies of the same settings is how you introduce drift - someone changes one and not the other eight. This node makes that impossible by construction.

How it works

The inputs are the stock ImageScale ones, all shared across the batch:

  • upscale_method - nearest-exact, bilinear, area, bicubic, lanczos. The usual tradeoffs apply: lanczos for the sharpest downscale, bicubic for general use, nearest for pixel art. The pack's other image/video nodes default to these same choices, so pick one and it's consistent everywhere.
  • width / height - up to 16384. The twist worth knowing: if you set either one to 0, the node computes it to preserve the aspect ratio. Width 0 + height 512 scales every image to 512 tall, whatever the original shape.
  • crop - disabled or center. When you force exact dimensions that don't match the source aspect ratio, this decides whether to stretch or center-crop.

The "up to nine" part comes from the dynamic-port trick: connect a second image to the image2 slot and it appears; keep adding up to the nine-lane ceiling. Each image is resized independently with the shared settings - no cross-image blending, no assumptions about matching dimensions on the way in.

The outputs

Nine outputs, labeled ๅ›พๅƒ1 through ๅ›พๅƒ9. Here's the honest part: the node always returns nine, and unconnected slots are filled by repeating the first result. That means if you only feed three images, outputs 4โ€“9 are copies of image 1. It's a convenience (downstream batch nodes often want a fixed count) and a trap (grab the wrong output and you'll wonder why everything's identical). Always wire by matching the input index.

Install

Standard XB_ToolBox install: ComfyUI Manager โ†’ search XB_ToolBox, or git clone https://github.com/wjluoxiao/XB_ToolBox.git into custom_nodes, restart. No dependencies, no models - pure torch ops over ComfyUI's own common_upscale.

The usual gotcha is expecting it to do something smarter than it does. It's a batch tool, not a resizer with model-based upscaling - feeding it 512px images and asking for 2048 will give you a soft upscale, not a detail-restoring one. If you want AI upscaling (ESRGAN, SUPIR-style), you pair this with an upscaler model node after it, or reach for the dedicated upscaling packs. For simple, consistent, batch resize - the actual job - it's hard to beat.

CategoryXB_ToolBox/Utils

Inputs (5)

NameTypeDefaultDescription
upscale_methodCOMBO5 options: nearest-exact, bilinear, area, bicubic, lanczos
widthINT5120โ€“16384โ€”
heightINT5120โ€“16384โ€”
cropCOMBO2 options: disabled, center
image1IMAGEโ€”

Outputs (9)

NameTypeDescription
ๅ›พๅƒ1IMAGEโ€”
ๅ›พๅƒ2IMAGEโ€”
ๅ›พๅƒ3IMAGEโ€”
ๅ›พๅƒ4IMAGEโ€”
ๅ›พๅƒ5IMAGEโ€”
ๅ›พๅƒ6IMAGEโ€”
ๅ›พๅƒ7IMAGEโ€”
ๅ›พๅƒ8IMAGEโ€”
ๅ›พๅƒ9IMAGEโ€”