Replace the Streamlit-based UI (app.py + tab_*.py) with an event-driven NiceGUI implementation. This eliminates 135 session_state accesses, 35 st.rerun() calls, and the ui_reset_token hack. Key changes: - Add main.py as NiceGUI entry point with sidebar, tabs, and file navigation - Add state.py with AppState dataclass replacing st.session_state - Add tab_batch_ng.py (batch processor with blur-binding, VACE calc) - Add tab_timeline_ng.py (history tree with graphviz, batch delete) - Add tab_raw_ng.py (raw JSON editor) - Add tab_comfy_ng.py (ComfyUI monitor with polling timer) - Remove Streamlit dependency from utils.py (st.error → logger.error) - Remove Streamlit mock from tests/test_utils.py 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:
- Streamlit 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 (Streamlit Manager)
# Repository: python:3.12-slim
# Network: Bridge
# WebUI: http://[IP]:[PORT:8501]
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 streamlit opencv-python-headless graphviz streamlit-agraph && \
cd /app && streamlit run app.py --server.headless true --server.port 8501"
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:8501).
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)
├── app.py # Streamlit main entry point & navigator
├── utils.py # I/O, config, defaults, case-insensitive path resolver
├── history_tree.py # Git-style branching engine
├── tab_batch.py # Batch processor UI
├── tab_timeline.py # Visual timeline UI
├── tab_comfy.py # ComfyUI server monitor
├── tab_raw.py # Raw JSON editor
└── tests/
├── test_json_loader.py
├── test_utils.py
└── test_history_tree.py