Files
JasonHoku-ComfyUI-Ultimate-…/web
Jason HokuandClaude Opus 4.6 7b437f0e2f feat: instant model loading with localStorage cache + background polling
Performance improvements for Builder UI model/LoRA loading:

localStorage persistent cache:
- Model lists cached to localStorage on first fetch
- On page reload, cached data renders instantly (no network wait)
- Cache expires after 24 hours, cleared on explicit Refresh Models
- Saves all categories: checkpoints, diffusion, GGUF, text encoders,
  VAEs, upscale models, samplers, schedulers, clip types

Background count polling:
- New /configbuilder/model_counts endpoint returns file counts per
  category (fast — uses folder_paths internal stat-based cache)
- Frontend polls every 30s, compares counts to last known values
- On change: auto-refreshes model lists and re-renders UI
- No manual Refresh Models needed when adding new models

Deduplicated /object_info:
- Shared _getObjectInfo() cache ensures the expensive /object_info
  endpoint is called at most once per session (was called 2-3x)
- getAvailableLoras() and getAvailableModels() share the cached response

Polling lifecycle:
- Starts after initial render, stops when node is removed
- Only active while ConfigBuilder node exists on canvas

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 11:13:18 -07:00
..