history_tree.py:
- Cycle protection in generate_graph() parent walk
- KeyError → .get() for malformed node data in commit() and generate_graph()
- UUID collision check with for/else raise in commit() and _migrate_legacy()
- RuntimeError → ValueError for consistent exception handling
tab_timeline_ng.py:
- Re-parent children walks to surviving ancestor for batch deletes
- Branch tip deletion re-points to parent instead of removing branch
- Cycle protection in _walk_branch_nodes and _find_branch_for_node
- Full data.clear() restore instead of merge in _restore_node
- Safe .get('data', {}) in restore and preview
- Reset stale branch selection after node deletion
- json.dumps for safe JS string escaping in graphviz renderer
tab_batch_ng.py:
- NaN/inf rejection in dict_number with math.isfinite()
- _safe_int used in recalc_vace, update_mode_label, frame_to_skip
- Uncaught ValueError from htree.commit() caught with user notification
tab_comfy_ng.py:
- asyncio.get_event_loop() → get_running_loop()
utils.py:
- Atomic writes for save_config and save_snippets
- save_config extra_data can't override explicit last_dir/favorites
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
A visual dashboard for managing, versioning, and batch-processing JSON configuration files used in AI video generation workflows (I2V, VACE). Two parts:
- NiceGUI Web Interface — Dockerized editor for prompts, LoRAs, settings, and branching history
- ComfyUI Custom Nodes — Read JSON files directly into workflows, including a dynamic node that auto-discovers keys
Features
Batch Processor
|
|
Visual Timeline
|
Dynamic Node (New)
|
Installation
1. Unraid / Docker (NiceGUI Manager)
# Repository: python:3.12-slim
# Network: Bridge
# WebUI: http://[IP]:[PORT:8080]
Path Mappings:
| Container | Host | Purpose |
|---|---|---|
/app |
/mnt/user/appdata/ai-manager/ |
App files |
/mnt/user/ |
/mnt/user/ |
Project data / JSON location |
Post Arguments:
/bin/sh -c "apt-get update && apt-get install -y graphviz && \
pip install nicegui graphviz requests && \
cd /app && python main.py"
2. ComfyUI (Custom Nodes)
cd ComfyUI/custom_nodes/
git clone <this-repo> ComfyUI-JSON-Manager
# Restart ComfyUI
ComfyUI Nodes
Node Overview
Dynamic Node
The JSON Loader (Dynamic) node reads your JSON file and automatically creates output slots for every key it finds. No code changes needed when your JSON structure evolves.
How it works:
- Enter a
json_pathandsequence_number - Click Refresh Outputs
- Outputs appear named after JSON keys, with native types preserved
json_path: /data/prompt.json sequence_number: 1
Refresh Outputs general_prompt negative seed flf camera KSampler positive seed STRING INT FLOATType handling: Values keep their native Python type — int stays int, float stays float, booleans become "true"/"false" strings, everything else becomes string. The * (any) output type allows connecting to any input.
Refreshing is safe: Clicking Refresh after adding new keys to your JSON preserves all existing connections. Only removed keys get disconnected.
Standard & Batch Nodes
| Node | Outputs | Use Case |
|---|---|---|
| JSON Loader (Standard/I2V) | prompts, flf, seed, paths | Single-file I2V workflows |
| JSON Loader (VACE Full) | above + VACE integers | Single-file VACE workflows |
| JSON Loader (LoRAs Only) | 6 LoRA strings | Single-file LoRA loading |
| JSON Batch Loader (I2V) | prompts, flf, seed, paths | Batch I2V with sequence_number |
| JSON Batch Loader (VACE) | above + VACE integers | Batch VACE with sequence_number |
| JSON Batch Loader (LoRAs) | 6 LoRA strings | Batch LoRA loading |
| JSON Loader (Custom 1/3/6) | 1, 3, or 6 string values | Manual key lookup by name |
Web Interface Usage
Navigate to your container's IP (e.g., http://192.168.1.100:8080).
Path navigation supports case-insensitive matching — typing /media/P5/myFolder will resolve to /media/p5/MyFolder automatically.
- Custom Parameters: Scroll to "Custom Parameters" in any editor tab. Type a key and value, click Add.
- Timeline: Switch to the Timeline tab to see version history as a graph. Restore any version, and new edits fork a branch automatically.
- Snippets: Save reusable prompt fragments and append them with one click.
JSON Format
{
"batch_data": [
{
"sequence_number": 1,
"general_prompt": "A cinematic scene...",
"negative": "blurry, low quality",
"seed": 42,
"flf": 0.5,
"camera": "pan_left",
"video file path": "/data/input.mp4",
"reference image path": "/data/ref.png",
"my_custom_key": "any value"
// ... any additional keys are auto-discovered by the Dynamic node
}
]
}
File Structure
ComfyUI-JSON-Manager/
├── __init__.py # ComfyUI entry point, exports nodes + WEB_DIRECTORY
├── json_loader.py # All ComfyUI node classes + /json_manager/get_keys API
├── web/
│ └── json_dynamic.js # Frontend extension for Dynamic node (refresh, show/hide)
├── main.py # NiceGUI web UI entry point & navigator
├── state.py # Application state management
├── utils.py # I/O, config, defaults, case-insensitive path resolver
├── history_tree.py # Git-style branching engine
├── tab_batch_ng.py # Batch processor UI (NiceGUI)
├── tab_timeline_ng.py # Visual timeline UI (NiceGUI)
├── tab_comfy_ng.py # ComfyUI server monitor (NiceGUI)
├── tab_raw_ng.py # Raw JSON editor (NiceGUI)
└── tests/
├── test_json_loader.py
├── test_utils.py
└── test_history_tree.py