Input Image Array (ShellAgent Plugin)
Take a list of images and split it four ways
- images_batch
- masks_batch
- images_list
- count
Input Image Array (ShellAgent Plugin) is the batch-capable cousin of Input Image: instead of one image, it accepts an array of images - a JSON list of URLs or file paths, the format a ShellAgent app uses when it hands a workflow several pictures at once - and splits it into the four things downstream nodes actually want: a batched IMAGE, batched masks, an iterable list of images, and a count.
This is the node you reach for when the app's input isn't "here's a picture" but "here's a pile of pictures" - a folder of references for style transfer, multiple input frames for a video model, a set of images to process in a loop.
How it works
The default_value is a JSON string, defaulting to [], with a placeholder showing the expected shape: ["https://example.com/a.png", "https://example.com/b.png"]. Each entry is loaded (local paths and URLs both work), and the results are organized into:
- images_batch - one
IMAGEtensor with all frames stacked along the batch dimension. - masks_batch - the matching
MASKtensor for each image. - images_list - the same images as a Python list (
OUTPUT_IS_LISTtrue), for nodes that iterate. - count - an
INTwith the number of images.
The resize_mode option decides what to do when the images aren't all the same size: pad_to_first, resize_to_first, or none_keep_list_only (leave them alone, useful only for the list output). min_items/max_items let you enforce the array length - handy as a sanity check against the app sending nothing or sending too much.
There's a deliberate edge-case behavior worth knowing: an empty array doesn't error - it returns a 1×1 black image and count 0, so the rest of the workflow doesn't crash while the app is still deciding what to send.
Inputs that matter
- input_name - the variable name the app sees. Default
input_images. - default_value - the JSON array of image references. This is what the app overrides at runtime.
- resize_mode - how to reconcile mixed sizes.
resize_to_first(the default) is usually what you want for batching. - min_items / max_items - optional length constraints; 0 means unlimited.
Installing it
Same one-pack install:
cd ComfyUI/custom_nodes
git clone https://github.com/myshell-ai/ComfyUI-ShellAgent-Plugin
restart, or grab ComfyUI-ShellAgent-Plugin from ComfyUI Manager. No model downloads; the pack's usual pip requirements install with it.
Common issues
- "Invalid array input" error. The
default_valueisn't parseable JSON. Watch for trailing commas or single quotes - JSON, not Python. - Batch is all black. An empty (or all-failed) array falls back to the 1×1 black placeholder. Check that the app is actually sending entries.
- Images with different sizes break the batch. Use
resize_to_first(orpad_to_firstif you want to preserve aspect content) instead of the list-only mode. - count is 0 but I sent images. The node truncates to
max_itemsand validates againstmin_items; verify those aren't fighting your input length.
If you're building anything batch-shaped for an agent to feed, this is the input node you'll use far more than the singular Input Image.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| input_name | STRING | input_images | — |
| default_value | STRING | [] | — |
| descriptionopt | STRING | — | |
| resize_modeopt | COMBO | resize_to_first | 3 options: pad_to_first, resize_to_first, none_keep_list_only |
| min_itemsopt | INT | 00–1024 | — |
| max_itemsopt | INT | 00–1024 | 0 = unlimited |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| images_batch | IMAGE | — |
| masks_batch | MASK | — |
| images_list | IMAGE | — |
| count | INT | — |