Dynamic Image Input 🖼️
Collect any number of images onto one list output — ports grow as you connect
- image_1
- images
Batch workflows have an annoying habit of needing "all these images in one place," and ComfyUI's fixed node inputs mean you either commit to a specific number of slots or juggle list utilities. Dynamic Image Input dodges the problem: you connect one image, it grows a port; connect that, it grows another. When you're done, everything you plugged in arrives as a single image list on the output. No counting slots, no rewiring when you add a fifth source.
It's the image half of the Painting Coder Utils dynamic-input pair - the mask version works identically.
How it works
The magic lives in the pack's JavaScript. The node starts with one image_1 input. When you attach an image to it, the front-end watches connection changes and automatically adds a fresh empty image_N port; unplug a connection and it trims unused slots. On the Python side, the node collects every connected image (skipping anything that came in as None from an empty slot) and returns them as a list - OUTPUT_IS_LIST is on, so the single images output is genuinely a list.
If nothing valid is connected at all, it returns a single blank image instead of crashing, so the graph doesn't die mid-edit. Same "blank means blank" caveat as the pack's switch nodes: that placeholder is a real image and will flow downstream if you run with it.
Inputs and output
image_1- the initial required IMAGE input; more appear automatically as you connect.- Output:
images- a list of all connected images.
Where it fits
- Assembling a pile of reference images for a batch process that iterates over an image list.
- As an organizational hub - gather several sources at one point before they fan out to a comparer or a grid node.
- Dynamic workflow building, where the number of sources changes from run to run and you don't want to babysit fixed input counts.
Two things to know: it collects, it doesn't composite - don't expect a tiled grid or a merged image. And the dynamic-port behavior needs the pack's web/js front-end to load; if you've disabled custom node front-ends, you'll only ever see the single image_1 port.
Install
ComfyUI Manager → Painting Coder Utils, or:
cd ComfyUI/custom_nodes
git clone https://github.com/jammyfu/ComfyUI_PaintingCoderUtils.git
Restart ComfyUI. No models or API keys; the pack's requirements (numpy, Pillow, torch, gradio) are already satisfied by any working ComfyUI. And if an older workflow can't find these nodes, blame the v0.3.0 namespace rename, not the install - the bundled fixer at docs/fix/workflow_fixer.html handles it.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| image_1 | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |