A single ComfyUI node that reads any JSON file and automatically creates output slots for every key it finds. No hardcoded outputs — when your JSON structure changes, just click Refresh.
- Auto-discovery — reads JSON keys and exposes them as named outputs
- Type detection —
INT,FLOAT,STRINGtypes with colored connectors - Batch support —
sequence_numberinput forbatch_dataarrays - Connection-safe refresh — adding new keys preserves existing links
- Workflow persistence — keys, types, and connections survive save/reload
Search for JSON Dynamic Loader in the ComfyUI Manager registry.
cd ComfyUI/custom_nodes/
git clone https://github.com/ethanfel/ComfyUI-JSON-Dynamic.git
# Restart ComfyUI- Add JSON Dynamic Loader node to your workflow
- Enter a
json_pathandsequence_number - Click Refresh Outputs
- Outputs appear named after your JSON keys with correct types
- Connect to downstream nodes
| JSON type | Output type | Connector |
|---|---|---|
42 (integer) |
INT |
Blue |
3.14 (float) |
FLOAT |
Teal |
"hello" (string) |
STRING |
Pink |
true / false |
STRING ("true" / "false") |
Pink |
For simple use cases, the node reads keys directly from the root object. The sequence_number input is ignored.
{
"general_prompt": "A cinematic scene...",
"seed": 42,
"flf": 0.5,
"camera": "pan_left"
}For multi-shot workflows, wrap entries in a batch_data array. Each entry is a segment representing one shot/scene with its own settings. The sequence_number input selects which segment to read.
{
"batch_data": [
{
"sequence_number": 1,
"general_prompt": "Wide establishing shot of a city",
"seed": 42,
"camera": "static",
"flf": 0.0
},
{
"sequence_number": 2,
"general_prompt": "Close-up of the protagonist",
"seed": 108,
"camera": "pan_left",
"flf": 0.5,
"my_custom_key": "only on this segment"
},
{
"sequence_number": 3,
"general_prompt": "Aerial drone shot over rooftops",
"seed": 77,
"camera": "zoom_in",
"flf": 0.8
}
]
}The node resolves which segment to read using this logic:
- Match by
sequence_numberfield — scansbatch_datafor an entry whosesequence_numbermatches the input - Fallback to array index — if no match is found, uses
sequence_number - 1as the array index (clamped to bounds) - No
batch_data— reads keys from the root object directly
This means segments don't need to be in order and can have gaps (e.g. 1, 5, 10). Each segment can have different keys — click Refresh Outputs after changing sequence_number if the keys differ between segments.