ComfyUI-Batched-Meta
A collection of batch-processing utility nodes for ComfyUI. These nodes read structured JSON data files and output parameters one entry at a time, driven by a seed value — making them ideal for automated batch illustration and generation workflows.
ComfyUI-Batched-Meta
A collection of batch-processing utility nodes for ComfyUI. These nodes read structured JSON data files and output parameters one entry at a time, driven by a seed value — making them ideal for automated batch illustration and generation workflows.
Nodes
DJZ Batch Illustrator
Loads a JSON file containing an array of illustration entries and outputs a single entry's parameters (filename, prompt, width, height) based on a seed value. Incrementing the seed steps through the entries sequentially, wrapping around when the end is reached.
Category: DJZ/Batch
Inputs:
| Input | Type | Description |
|-------|------|-------------|
| json_file | Dropdown | Select a JSON file from the data directory |
| seed | INT | Index selector — entry is chosen via seed % total_entries |
Outputs:
| Output | Type | Description |
|--------|------|-------------|
| filename | STRING | The filename stem for the current entry |
| prompt | STRING | The generation prompt for the current entry |
| width | INT | Image width in pixels |
| height | INT | Image height in pixels |
Installation
Manual Install
- Navigate to your ComfyUI custom nodes directory:
cd ComfyUI/custom_nodes/ - Clone this repository:
git clone https://github.com/MushroomFleet/ComfyUI-Batched-Meta.git - Restart ComfyUI.
No additional Python dependencies are required.
Usage
1. Prepare a JSON Data File
Create a JSON file containing an array of entry objects. Each entry must have four fields:
[
{
"filename": "chapter_01_cover",
"prompt": "A lone traveller stands at the edge of a vast misty forest, dramatic lighting, painterly style",
"width": 768,
"height": 1024
},
{
"filename": "chapter_02_village",
"prompt": "A medieval village at dusk, warm lantern light spilling from windows, cobblestone streets",
"width": 1024,
"height": 768
}
]
| Field | Type | Description |
|-------|------|-------------|
| filename | string | Output filename stem (no extension) |
| prompt | string | The image generation prompt |
| width | integer | Image width in pixels |
| height | integer | Image height in pixels |
An example file (example_batch.json) is included in the batch_illustrator_data/ directory.
2. Place the JSON File
Put your JSON file into the batch_illustrator_data/ folder inside this node pack's directory:
ComfyUI/custom_nodes/ComfyUI-Batched-Meta/batch_illustrator_data/your_file.json
The directory is created automatically on first run if it does not exist.
3. Add the Node to Your Workflow
- In ComfyUI, right-click the canvas and search for "DJZ Batch Illustrator" (or navigate to
DJZ > Batch). - Select your JSON file from the
json_filedropdown. - Connect the outputs to your workflow:
- filename → connect to a Save Image node's filename prefix, or any string input.
- prompt → connect to a CLIP Text Encode (positive prompt) or any string input.
- width / height → connect to an Empty Latent Image node or any integer inputs that control image dimensions.
4. Batch Processing with Seed
The node uses the seed value to select which entry from the JSON file to output:
seed = 0→ first entryseed = 1→ second entryseed = N→ entry at indexN % total_entries(wraps around)
To process the entire batch, set your workflow to queue multiple generations with incrementing seed values. For example, if your JSON has 5 entries, queue 5 generations with seeds 0–4.
Tip: Pair this node with ComfyUI's built-in batch queue or an auto-queue workflow. Each queued generation increments the seed, stepping through every entry in your JSON file automatically.
Example Workflow
[DJZ Batch Illustrator] → prompt → [CLIP Text Encode] → [KSampler]
→ width → [Empty Latent Image]
→ height → [Empty Latent Image]
→ filename → [Save Image (filename_prefix)]
File Structure
ComfyUI-Batched-Meta/
├── __init__.py # Node pack entry point
├── DJZ_batch_illustrator.py # Batch Illustrator node
├── batch_illustrator_data/ # JSON data directory
│ └── example_batch.json # Example batch file
├── requirements.txt # Dependencies (none)
└── README.md # This file
Notes
- The JSON file is cached in memory after the first load for performance. Restart ComfyUI or change the selected file to reload.
- The node prints the current entry index and filename to the console on each execution for progress tracking.
- Entry selection wraps around, so a seed of 5 with a 5-entry file will loop back to the first entry.
Citation
Academic Citation
If you use this codebase in your research or project, please cite:
@software{comfyui_batched_meta,
title = {ComfyUI-Batched-Meta: Batch-processing utility nodes for ComfyUI},
author = {Drift Johnson},
year = {2025},
url = {https://github.com/MushroomFleet/ComfyUI-Batched-Meta},
version = {1.0.0}
}
