Some checks failed
Publish to Comfy registry / Publish Custom Node to registry (push) Has been cancelled
- Add pyproject.toml with registry metadata (publisher: ethanfel) - Add .github/workflows/publish.yml for auto-publish on version bump - Update README with GitHub clone URL and ComfyUI Manager install Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
5.6 KiB
5.6 KiB
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,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
Installation
ComfyUI Manager
Search for JSON Dynamic Loader in the ComfyUI Manager registry.
Manual
cd ComfyUI/custom_nodes/
git clone https://github.com/ethanfel/ComfyUI-JSON-Dynamic.git
# Restart ComfyUI
Usage
- 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
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:
{
"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.