Create Image Batch From JSON Array (Soze)
Turn a JSON list into a loadable image batch
- images
Turns a JSON array into a loaded IMAGE batch, gluing a shared prefix and suffix onto each entry to build a real, loadable path. If you've got a JSON-driven list of image references sitting somewhere in your pipeline - hand-authored, or produced by another node upstream - this is how you turn that list into images you can actually generate with.
How it works
Reading the fields together: json_array holds a JSON array of partial identifiers (most naturally filenames or path fragments - a list like ["001", "002", "003"]), and prefix/suffix get stitched onto each entry to form the full path (prefix + entry + suffix, e.g. renders/img_ + 001 + .png). The node loads whatever each of those full paths points to and stacks the results into one IMAGE batch.
The inputs and outputs that matter
json_array(STRING, required) - the JSON array of entries to build paths from.prefix(STRING, default empty) - text prepended to every entry before loading.suffix(STRING, default empty) - text appended to every entry, most commonly a file extension like.png.- Output:
images(IMAGE) - the loaded batch, ready to wire into anything downstream that expects a batch of images.
How to install it
Via ComfyUI Manager: search "Quality of Life Nodes for ComfyUI", install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/SozeInc/ComfyUI_Soze.git
pip install -r ComfyUI_Soze/requirements.txt
No API keys, no heavy dependencies.
Common issues & troubleshooting
Nothing loads, or you get a path-not-found error. Build the expected path by hand for one entry first (prefix + one array item + suffix) and confirm a file genuinely exists at that exact path - it's an easy place for a missing slash or a wrong extension in suffix to slip through.
You don't actually need prefix/suffix. If your JSON array already holds full, ready-to-load paths, just leave both empty - the node still works, it just isn't gluing anything onto the entries.
The images that came out are in the wrong order, or some are missing. Since the batch is built directly from the JSON array's order, check the array itself first - if an entry is malformed JSON or the wrong type, that's more likely the cause than the node dropping something silently.
Where would this JSON array even come from? Commonly the output of one of this pack's own JSON nodes (JSON Value Parser, JSON Path Extractor) further upstream, or something you've hand-written for a specific batch - the schema doesn't assume a particular source, just that you hand it valid JSON.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| json_array | STRING | — | |
| prefix | STRING | — | |
| suffix | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |