Nodes/ComfyUI-ZML-Image/ZML_统一图像分辨率
ComfyUI Node

ZML_统一图像分辨率

Force a pile of images onto one canvas — ZML_统一图像分辨率

By zml-w·Created about a year ago·Updated 2 months ago· 218
ZML_统一图像分辨率
  • 图像1
  • 图像2
  • 图像3
  • 图像4
  • 图像5
  • 图像6
  • 图像7
  • 图像8
  • 图像9
  • 图像10
  • 图像11
  • 图像12
  • 图像13
  • 图像14
  • 图像15
  • 图像16
  • 图像17
  • 图像18
  • 图像19
  • 图像20
  • 图像
  • 输出宽度
  • 输出高度
分辨率根据首张图像
宽度1024
高度1024
处理模式

ZML_统一图像分辨率 solves the most boring and most annoying problem in batch image work: images that don't match. You've got ten renders at different sizes, or an inpainting pass that spat out a different aspect ratio than its input, and now nothing stacks or compares cleanly. This node drags up to 20 images onto one canvas and hands you the numbers it used.

The mechanism is straightforward and well-thought-out. Twenty optional 图像1图像20 inputs (all list-capable - the author updated this so each input can take a whole batch) feed in. The 分辨率 dropdown picks the target:

  • 根据首张图像 (default) - use the first image's size
  • 根据最大图像 / 根据最小图像 - size the canvas from the biggest or smallest input
  • 自定义 - use the explicit 宽度/高度 fields (8–8192, step 8)

Then 处理模式 decides how mismatched images fit: 拉伸 (stretch, the pixel-pusher's option), 中心裁剪 (center-crop to canvas, losing edges), or 填充黑/填充白/填充透明 (letterbox/pad, preserving content). It converts through RGBA internally so transparency survives the fill modes, which the README explicitly lists as a reason the node pairs well with ZML_文本图像 - pad everything to one size, then add labels.

Outputs: the unified 图像, plus 输出宽度 and 输出高度 as INTs. Those two numbers are the sleeper feature - wire them into a sampler, an empty latent, or a resolution node downstream and the whole graph learns the canvas dimensions from whatever actually happened, instead of you hardcoding a value that drifts.

The README notes the input interface was made dynamic (it used to be fixed sockets) and that it handles lists - so a ZML_文本列表 loop feeding different-sized renders through here is the intended recipe for clean contact sheets.

Installing it

Ships in ComfyUI-ZML-Image. ComfyUI Manager → ComfyUI-ZML-Image, or:

cd ComfyUI/custom_nodes
git clone https://github.com/zml-w/ComfyUI-ZML-Image

Restart. Pure Pillow/numpy - no model downloads. Chinese UI; English patch at https://github.com/zml-w/ZZZ_ZML_English_Patch.

Common issues

The traps here are the five processing modes, and they're traps by design. 拉伸 will happily squish a portrait render into a landscape canvas and you'll wonder why faces look wrong - for compositing you almost always want one of the pad modes or 中心裁剪. Transparent fill only works if your images actually carry alpha; a JPEG-in gets an opaque black pad whether you asked for black or not.

The 根据首张图像 default is a classic silent-mismatch generator: if your first image is an odd one out, everything conforms to it. When building a grid of mixed renders, 根据最大图像 is usually the less surprising choice. And the 20-input cap is real - if your batch has 25 frames, you'll need two nodes and a merge, not a bigger number.

Last, the pack's usual honesty applies: solo dev, Chinese-first, updated weekly. This node got a documented revamp (dynamic inputs, list support) so it's on the maintained side of the pack, but test the mode you plan to rely on before you trust a 200-image batch to it.

Categoryimage/ZML_图像/图像

Inputs (24)

NameTypeDefaultDescription
分辨率COMBO根据首张图像4 options: 根据首张图像, 根据最大图像, 根据最小图像, 自定义
宽度INT10248–8192
高度INT10248–8192
处理模式COMBO5 options: 拉伸, 中心裁剪, 填充黑, 填充白, 填充透明
图像1optIMAGE
图像2optIMAGE
图像3optIMAGE
图像4optIMAGE
图像5optIMAGE
图像6optIMAGE
图像7optIMAGE
图像8optIMAGE
图像9optIMAGE
图像10optIMAGE
图像11optIMAGE
图像12optIMAGE
图像13optIMAGE
图像14optIMAGE
图像15optIMAGE
图像16optIMAGE
图像17optIMAGE
图像18optIMAGE
图像19optIMAGE
图像20optIMAGE

Outputs (3)

NameTypeDescription
图像IMAGE
输出宽度INT
输出高度INT