The off-loop (threaded) build introduced a concurrency bug: ComfyUI's
cache_helper is a global, so a manual refresh (R) fired while a rebuild was
still running started a SECOND build; when the first finished it cleared the
shared cache_helper, making the second re-walk the CIFS mount per-node = hang.
Now an asyncio lock serialises builds: concurrent object_info requests wait for
the in-flight build and serve its result instead of starting another. Verified:
3 concurrent requests -> exactly one build.
Docs: note that Quick refresh detects changes by directory mtime, which network
mounts (cache=loose CIFS) can report stale/coarse, so it may miss a brand-new
file -- use Full refresh for just-added models.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Adds a small status line on ComfyUI's loading splash showing whether
Tenaciousload is serving object_info from cache or building it (live node
count + elapsed time, with a 'scanning model folders over the network' hint
when the CIFS walk stalls progress). Removes itself on the app 'setup' hook.
Backend tracks build progress (_build_state) and exposes GET /tenaciousload/status;
frontend web/loading-status.js polls it and renders an unobtrusive overlay.
Unit-tested progress tracking + status shape.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Folding the input-dir mtime into the cache fingerprint backfired on busy input
folders (e.g. a video workflow constantly adding clips): the input dir changed
on nearly every restart, invalidating the cache and forcing a ~5-min rebuild of
the (now 74 MB) object_info over the CIFS model mount on each load -- the exact
slowness the pack exists to avoid.
Input watching is now opt-in via TENACIOUSLOAD_WATCH_INPUT=1. By default new
input files are picked up via a refresh button, same as new models. Node code
changes are still auto-detected. Unit-tested.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Fingerprints NODE_CLASS_MAPPINGS; on the first object_info request after a
restart, drops the cached object_info if a node was installed/updated/enabled/
removed, so new nodes appear without a manual refresh. First run (no stored
signature) does not invalidate. Unit-tested.
Also documents that the pack has no deps and does not interfere with other
nodes' installs/updates or their own routes.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- quick: incremental rescan — re-walks only folders whose mtime changed
(per-dir snapshot persisted to cache/scan_snapshot.json); reuses
the cache for unchanged folders. Catches new/removed/renamed files.
- register: append specific file path(s) with NO folder walk (instant disk-wise)
- full: unchanged default (clear cache -> full re-walk)
Frontend exposes all three as Extensions-menu commands; the graph node gains a
quick/full mode widget. POST /tenaciousload/refresh now takes {mode, folder, files}.
Unit-tested: incremental scan rescans only the changed dir; register adds/skips.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- banner/diagram: replace localhost '4 ms' (server-only) with the real
page-load experience (minutes -> seconds); soften tagline to 'Fast'
- README: add section on the optional --enable-compress-response-body flag
for gzipping the rest of ComfyUI (frontend scripts, other APIs)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
ComfyUI-Tenaciousload speeds up ComfyUI page loads for large model/LoRA
collections by caching the slow /api/object_info response in memory and on
disk (survives restarts) and serving it gzipped in ~milliseconds, instead of
rebuilding it (and freezing the event loop) on every load.
Adds a "Refresh Models / LoRAs" menu button, a graph node, and a
POST /tenaciousload/refresh endpoint to rebuild the cache after adding or
removing models. No external dependencies; no nginx/docker required.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>