{ Dynamic } ComfyUI JSON Dynamic Loader Auto-discover JSON keys as typed output slots

License ComfyUI

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. ## Features - **Auto-discovery** — reads JSON keys and exposes them as named outputs - **Type detection** — `INT`, `FLOAT`, `STRING` types with colored connectors - **Batch support** — `sequence_number` input for `batch_data` arrays - **Connection-safe refresh** — adding new keys preserves existing links - **Workflow persistence** — keys, types, and connections survive save/reload ## Installation ### ComfyUI Manager Search for **JSON Dynamic Loader** in the ComfyUI Manager registry. ### Manual ```bash cd ComfyUI/custom_nodes/ git clone https://github.com/ethanfel/ComfyUI-JSON-Dynamic.git # Restart ComfyUI ``` ## Usage 1. Add **JSON Dynamic Loader** node to your workflow 2. Enter a `json_path` and `sequence_number` 3. Click **Refresh Outputs** 4. Outputs appear named after your JSON keys with correct types 5. Connect to downstream nodes

JSON Dynamic Loader json_path: /data/prompt.json sequence_number: 1 Refresh Outputs general_prompt negative seed flf camera KSampler positive seed

## Type Handling | JSON type | Output type | Connector | |:---|:---|:---| | `42` (integer) | `INT` | Blue | | `3.14` (float) | `FLOAT` | Teal | | `"hello"` (string) | `STRING` | Pink | | `true` / `false` | `STRING` (`"true"` / `"false"`) | Pink | ## JSON Format Works with flat JSON or `batch_data` arrays: ```json { "batch_data": [ { "sequence_number": 1, "general_prompt": "A cinematic scene...", "seed": 42, "flf": 0.5, "camera": "pan_left", "my_custom_key": "any value" } ] } ``` Without `batch_data`, reads keys directly from the root object. ## License [Apache 2.0](LICENSE)