加载批量图像
Twenty upload lanes, resized to multiples of 16 on the way in
- 批量图像A
- 批量图像B
- 批量图像C
- 批量图像D
- 批量图像E
- 批量图像F
- 批量图像G
- 批量图像H
- 批量图像I
- 批量图像J
- 批量图像K
- 批量图像L
- 批量图像M
- 批量图像N
- 批量图像O
- 批量图像P
- 批量图像Q
- 批量图像R
- 批量图像S
- 批量图像T
If your workflow compares two things, or blends three references, you end up with a column of image loaders. 加载批量图像 (YanhuoMultiImage) collapses that column into one node with twenty separate lanes, each of which takes a batch of images and pushes out a single IMAGE batch on its own output port.
What it does differently from LoadImage
Core LoadImage loads one image and returns a batch of one. This node gives you lanes: 批量图像A through 批量图像T, each accepting multiple files - uploaded by click, dragged in, or pasted straight from the clipboard - and each outputting a batch with one frame per file you put in the lane.
Two behaviours you don't get from core are worth understanding before you rely on them:
Everything gets rounded up to a multiple of 16. Width and height are each rounded up to the next multiple of 16 and resized with Lanczos interpolation. 1000×600 becomes 1008×608. This is a convenience for the model side of things - many architectures want dimensions divisible by 8 or 16, and the pack is pre-empting the error you'd otherwise get from a latent-size node. It's Lanczos, so it's a decent resize, but it is a resize: your pixels are not untouched. If exact dimensions matter to you, don't feed reference images through here.
Size mismatches within a lane are cropped, not stretched. If lane A holds a 1920×1080 and a 1024×1024, the first image sets the frame and the rest are centre-cropped to fit. That's the sane default - no distortion - but it does mean the edges of the odd-sized images get thrown away. Put your most important image first in the lane.
Empty lanes output a 64×64 black image instead of failing, the same placeholder convention the rest of this pack uses, and the merge node in the pack knows how to skip it. Nothing here errors out; a half-filled node still runs.
Paths
The node has one input, tracks_data, a STRING holding JSON like:
[{"name":"批量图像A","paths":["img1.png"]}]
You don't write it - the frontend maintains it as you add and drag files, and lanes can be renamed so the output labels read like your project instead of A/B/C. It's still just a string, so API callers can set the track list directly.
Path resolution is the flexible version: input:, output: and temp: prefixes map to ComfyUI's standard directories, absolute paths work, and a bare relative path is resolved against input/. If you've ever fought a node over "where does it look for my file", that convention is the answer - bare filenames mean ComfyUI/input/, and the prefixes are how you reach the other two directories.
When to reach for it
Reference-image batches for style or subject conditioning, a set of frames you exported and want back in the graph, quick A/B sheets where you'll use 筛选图像 to pull individual lanes apart. For a single image, core LoadImage is lighter on the canvas - this node is for when you already know you need several, or when you want the 16-multiple tidy-up without adding a resize node.
Each output is a plain IMAGE batch, so it plugs into anything: samplers, IPAdapter-style reference nodes, a save node, or 图像批次合并 if you want two lanes pooled into one batch.
Install
One of 16 nodes in yanhuo-easy-use - category yanhuo, Chinese labels in the canvas, MIT, v1.3.1. ComfyUI Manager → search the pack title → install → restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/yanhuoxunxianren/yanhuo-easy-use
# restart ComfyUI
No pip install: the pack lists no dependencies and uses only what ComfyUI ships (torch, numpy, Pillow, comfy.utils.lanczos). No model files. Because the upload lanes are frontend work, hard-refresh the browser tab after installing - a cached extension bundle shows up as an empty node body.
Common issues
"My resolution changed." That's the 16-multiple rounding; 1000 becomes 1008. Check what actually landed by previewing the loader output rather than trusting the file's real size.
"Frames in a lane look cropped." Size mismatch inside the lane, resolved by centre-crop against the first image. Split them into separate lanes, or resize before loading.
"The node is an empty box / no lanes." The frontend extension didn't load. Hard-refresh; check the browser console.
"The lane is empty but the graph ran." Empty lanes emit the 64×64 black placeholder - and so does a lane whose files all failed to load, because the loader skips unreadable or missing paths silently. Unlike the pack's audio loader, which names the failing path in the console, this one says nothing. Look at a preview of the lane, not at the absence of errors.
"Pasted images don't stick when I share the workflow." The lanes store paths, and pasting copies the file into ComfyUI/input/ - which is per-machine. Shared workflows move the graph, not the assets. That's the same convention described for save and load nodes in docs/knowledge/image-io-metadata.md.
"My model complains about the size anyway." Division by 16 isn't enough for every model - Flux wants 64-multiples, and the native-resolution table in docs/knowledge/troubleshooting.md is the reference for what each architecture actually trained on. Matching the model's native size upstream beats relying on a loader's rounding.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| tracks_data | STRING | JSON 格式滑轨数据,由前端自动维护。格式:[{"name":"批量图像A","paths":["img1.png"]}] |
Outputs (20)
| Name | Type | Description |
|---|---|---|
| 批量图像A | IMAGE | 滑轨 1 的合并 batch。 |
| 批量图像B | IMAGE | 滑轨 2 的合并 batch。 |
| 批量图像C | IMAGE | 滑轨 3 的合并 batch。 |
| 批量图像D | IMAGE | 滑轨 4 的合并 batch。 |
| 批量图像E | IMAGE | 滑轨 5 的合并 batch。 |
| 批量图像F | IMAGE | 滑轨 6 的合并 batch。 |
| 批量图像G | IMAGE | 滑轨 7 的合并 batch。 |
| 批量图像H | IMAGE | 滑轨 8 的合并 batch。 |
| 批量图像I | IMAGE | 滑轨 9 的合并 batch。 |
| 批量图像J | IMAGE | 滑轨 10 的合并 batch。 |
| 批量图像K | IMAGE | 滑轨 11 的合并 batch。 |
| 批量图像L | IMAGE | 滑轨 12 的合并 batch。 |
| 批量图像M | IMAGE | 滑轨 13 的合并 batch。 |
| 批量图像N | IMAGE | 滑轨 14 的合并 batch。 |
| 批量图像O | IMAGE | 滑轨 15 的合并 batch。 |
| 批量图像P | IMAGE | 滑轨 16 的合并 batch。 |
| 批量图像Q | IMAGE | 滑轨 17 的合并 batch。 |
| 批量图像R | IMAGE | 滑轨 18 的合并 batch。 |
| 批量图像S | IMAGE | 滑轨 19 的合并 batch。 |
| 批量图像T | IMAGE | 滑轨 20 的合并 batch。 |