π€ Leon Image Array Builder
Turn up to 8 images into the IMAGE_ARRAY the API nodes demand
- image_1
- image_2
- image_3
- image_4
- image_5
- image_6
- image_7
- image_8
- image_array
Leon Image Array Builder is the node you'll wire up without thinking about it, and then wonder how the pack works without it. Almost every image-generation node in comfyui-leon-nodes that accepts input images - the Nano Banana nodes, FLUX 2, GPT-Image, Grok - takes a special IMAGE_ARRAY type, not plain IMAGE sockets. ComfyUI won't let you drag a LoadImage wire onto those inputs. This node is the adapter: you plug in up to 8 images and it emits one image_array that the API nodes can actually swallow.
It's also doing real work under the hood, not just bundling tensors. The multi-image API models don't want raw tensors - they want images they can send over HTTP. So the Array Builder converts each input to either a base64 data URI (a self-contained data:image/png;base64,... string) or a hosted URL, depending on your output_mode.
How it works
Two modes, one dropdown:
output_mode=base64(default) - each image becomes a base64 data URI, preserving original dimensions. Zero extra credentials needed. This is the mode you want for the Tuzi Nano Banana nodes, which turn those data URIs back into file uploads for their multipart edit endpoint.output_mode=url- each image is uploaded to HyprLab (api.hyprlab.io/v1/uploads) and the array comes back as hosted URLs. This mode requires an API key - the node raises if you tryurlmode without one - and it's the mode you want for providers that prefer URLs over giant base64 blobs.
The inputs are image_1 through image_8 - eight optional IMAGE sockets, so the array is built in order and skips anything left disconnected. At least one image is mandatory (it errors otherwise). The output is a single image_array of type IMAGE_ARRAY.
One subtlety: for base64 mode, the node takes the first frame of a batched tensor ([0]), so a batch of 4 frames in one IMAGE socket becomes just the first frame - you genuinely need separate image_1/image_2/... inputs for multiple images. That trips people up more than anything else in this node.
Installing it
Pack-wide install:
cd ComfyUI/custom_nodes
git clone https://github.com/l3ony2k/comfyui-leon-nodes
pip install -r requirements.txt
Restart ComfyUI, or install "ComfyUI Leon Nodes" via ComfyUI Manager. Light dependencies, no models.
Where people get burned
The first-frame-of-a-batch gotcha above is the classic one - a batched tensor doesn't become multiple array items. Second: trying url mode without a HyprLab API key gets you an immediate error, and the URLs it produces live in HyprLab's cloud, so they're neither private nor permanent. Third, the cap: the Nano Banana nodes will only use the first 4 entries of the array, and FLUX 2 caps at 8β10 depending on model, so a bigger array is silently trimmed downstream. The mental model to hold: this node is the pack's universal input adapter, and almost every multi-image workflow in the pack starts here.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| output_mode | COMBO | base64 | Output format: 'base64' for data URIs, 'url' for uploaded image URLs |
| api_keyopt | STRING | HyprLab API key (required when output_mode is 'url') | |
| image_1opt | IMAGE | First image in the array | |
| image_2opt | IMAGE | Second image in the array | |
| image_3opt | IMAGE | Third image in the array | |
| image_4opt | IMAGE | Fourth image in the array | |
| image_5opt | IMAGE | Fifth image in the array | |
| image_6opt | IMAGE | Sixth image in the array | |
| image_7opt | IMAGE | Seventh image in the array | |
| image_8opt | IMAGE | Eighth image in the array |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image_array | IMAGE_ARRAY | β |