图像动态列表
A lazy image input that grows sockets instead of your patience
- 图像列表 (IMAGE)
The Grsai Nano Banana nodes take up to fourteen reference images. The MJ nodes want pad images, style references, and character references in separate sockets. Now imagine wiring all of that by hand in a giant workflow where the image count changes every time you swap a prompt. That's the pain this node removes: it's a variable-arity image collector. You set a number, it grows or shrinks its image_N input sockets to match, and whatever arrives gets merged into one IMAGE batch on the output.
It lives in the pack's Nkxx/Tools section, and it's the quiet workhorse of the whole kit. Every API node in this pack is a closed-model wrapper - none of it runs locally, so the local graph work is mostly preparing batches of images and text to send off. DynamicImageList is the "make me N reference slots" half of that.
How it works
Under the hood it's a thin custom node plus a frontend extension (web/tools.js). The Python side declares one widget, inputcount (INT, 1–100, default 1), and one output, 图像列表 (IMAGE) - which despite the Chinese name is a plain IMAGE batch. The JS listens to inputcount, then adds or removes image_1 … image_N inputs on the fly and re-lays-out the node so it doesn't collapse into a mess. Load a saved workflow and it re-derives the sockets from the stored inputcount, so old graphs don't come back with ghost ports.
You only ever set one thing: inputcount. The rest of the node is input sockets and the single IMAGE output.
Why you'd reach for it
- Feeding a variable number of reference images into a GrsaiNanoBanana-style node without re-wiring every time.
- Building a template workflow where a "how many images?" number at the top controls everything downstream.
- Merging several preview/selection lines into one batch before a save or a batch node.
It does exactly one job and does it with one widget - there's no config depth here, which is the point. If you need anything fancier (mask batches, per-item metadata), look at a purpose-built dynamic-input pack; this one is image-only.
Install & notes
Same pack, same install: ComfyUI Manager (search "ComfyUI-nkxx"), or
cd ComfyUI/custom_nodes
git clone https://github.com/jieg9341-lab/ComfyUI-nkxx
then restart. It needs nothing beyond what the pack already auto-installs (requests, pandas, opencv-python, etc.); there are no models to download because nothing runs locally.
One honest gotcha: as a frontend-driven dynamic node it can lag a beat after you change inputcount - the sockets redraw on a short timeout, so don't frantically re-click. And because it's just a merge, order in the batch follows socket index; if you're wiring the output into a batch node that cares about ordering, keep that in mind. If the sockets don't appear at all after an update, restart ComfyUI once - the extension load order is the usual suspect, and a fresh graph almost always fixes it.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| inputcount | INT | 11–100 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| 图像列表 (IMAGE) | IMAGE | — |