YC Live Load Images (Multi)
Drag in a stack of images, get an aligned batch out
- images
- masks
- image
- mask
- meta_json
The source code labels this one 实验节点 - experimental - so calibrate your expectations. YC Live Load Images (Multi) lets you drag or upload multiple images onto the node itself, see thumbnails immediately on the node face (no run needed just to check what you loaded), and on run hands back an aligned batch of images plus masks, a single chosen image, and the metadata JSON. It's the multi-image loader the pack was missing, with a live preview built in.
How it works
Your uploads land in ComfyUI's temp/input directories; the frontend writes the file list into images_json, and the backend resolves the actual paths from the JSON metadata, loads each image, and aligns the batch to a common size. The alignment is the interesting part: align_mode picks how. Default is largest - pad smaller images up with pad_color and mark the true image area in the mask (1.0 where the image actually is). You can also align to the first image or center-crop down to the smallest.
Inputs:
images_json- auto-written by the frontend; leave it alone.selected_index- which single image to pull out;-1means the last one.batch_start/batch_end- optional slice of the batch range (-1= unset).align_mode- first / largest / smallest.pad_color- fill hex for padded areas.
Outputs: images (batch), masks (batch), image (single), mask (single), meta_json (STRING).
What it's good for
The "see your batch before you run" preview plus aligned masks is the real value: feed the batch into batch inpainting, compositing, or a batch-to-batch pipeline and the masks tell you exactly which pixels are content versus padding. If you mostly load one image at a time with stock nodes, this is extra machinery. If you're assembling a multi-image batch pipeline and want masks for free, it's a shortcut.
Worth knowing: with nothing loaded, it returns a 64×64 blank plus an all-white mask and an empty meta_json, so an empty node won't hard-crash a run. It's experimental though - expect rough edges, and pin the pack version if a workflow depends on it.
Installing
cd ComfyUI/custom_nodes
git clone https://github.com/yichengup/ComfyUI-YCNodes_Toolkit
Restart (or ComfyUI Manager → "ComfyUI-YCNodes_Toolkit"). Dependencies are numpy and Pillow - no models to fetch. If you want thumbnails before running, make sure the frontend JS actually loaded; if the node face looks like a plain widget, a hard refresh of the ComfyUI page usually fixes it.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| images_json | STRING | 前端上传生成的图片列表 JSON | |
| selected_index | INT | -1-1–999 | — |
| batch_startopt | INT | -1-1–999 | — |
| batch_endopt | INT | -1-1–999 | — |
| align_modeopt | COMBO | largest | 3 options: first, largest, smallest |
| pad_coloropt | STRING | #000000 | — |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |
| masks | MASK | — |
| image | IMAGE | — |
| mask | MASK | — |
| meta_json | STRING | — |