ZML_统一图像分辨率
Force a pile of images onto one canvas — ZML_统一图像分辨率
- 图像1
- 图像2
- 图像3
- 图像4
- 图像5
- 图像6
- 图像7
- 图像8
- 图像9
- 图像10
- 图像11
- 图像12
- 图像13
- 图像14
- 图像15
- 图像16
- 图像17
- 图像18
- 图像19
- 图像20
- 图像
- 输出宽度
- 输出高度
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.
Inputs (24)
| Name | Type | Default | Description |
|---|---|---|---|
| 分辨率 | COMBO | 根据首张图像 | 4 options: 根据首张图像, 根据最大图像, 根据最小图像, 自定义 |
| 宽度 | INT | 10248–8192 | — |
| 高度 | INT | 10248–8192 | — |
| 处理模式 | COMBO | 5 options: 拉伸, 中心裁剪, 填充黑, 填充白, 填充透明 | |
| 图像1opt | IMAGE | — | |
| 图像2opt | IMAGE | — | |
| 图像3opt | IMAGE | — | |
| 图像4opt | IMAGE | — | |
| 图像5opt | IMAGE | — | |
| 图像6opt | IMAGE | — | |
| 图像7opt | IMAGE | — | |
| 图像8opt | IMAGE | — | |
| 图像9opt | IMAGE | — | |
| 图像10opt | IMAGE | — | |
| 图像11opt | IMAGE | — | |
| 图像12opt | IMAGE | — | |
| 图像13opt | IMAGE | — | |
| 图像14opt | IMAGE | — | |
| 图像15opt | IMAGE | — | |
| 图像16opt | IMAGE | — | |
| 图像17opt | IMAGE | — | |
| 图像18opt | IMAGE | — | |
| 图像19opt | IMAGE | — | |
| 图像20opt | IMAGE | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| 图像 | IMAGE | — |
| 输出宽度 | INT | — |
| 输出高度 | INT | — |