- Remove ARCHITECTURE.md and TESTING.md (outdated/duplicate docs) - Simplify README.md to focus on current 4-node architecture - Update CHANGELOG.md to reflect v1.0.0 release - Update web/README.md to match current implementation - Remove legacy _OLLAMA_MODELS global from state.py - Remove logs/ directory from repo, add to .gitignore - All 29 tests still passing
1.3 KiB
1.3 KiB
Custom Web Extensions for Ollama Model Manager
This directory contains JavaScript extensions that enhance the ComfyUI nodes with dynamic dropdowns.
Files
ollama_widgets.js
Implements dynamic model dropdown updates for Ollama nodes.
How It Works
- User connects nodes:
OllamaClient→OllamaModelSelector→OllamaLoadModel - User executes workflow: With
refresh=trueonOllamaModelSelector - Python backend: Fetches models from Ollama API (no CORS issues)
- JavaScript updates: Parses execution results and updates all model dropdowns
Features
- ✅ Dynamic dropdowns - Model lists update automatically after execution
- ✅ No CORS issues - All API calls through Python backend
- ✅ Downstream propagation - Load/Unload nodes get updated automatically
- ✅ Custom styling - Clean, readable dropdown display
- ✅ Cached models - Persists between workflow executions
Architecture
The JavaScript hooks into ComfyUI's execution lifecycle:
onExecuted: Updates dropdowns whenOllamaModelSelectorexecutesonConnectionsChange: Logs connection events for debuggingupdateModelDropdown: Helper function to refresh COMBO widgets
All model fetching happens in Python to avoid browser CORS restrictions.