Spaces:
Running on Zero

raylim Claude Sonnet 4.5 commited on
Commit
a2d70a9
·
unverified ·
1 Parent(s): 42a4892

Keep core models loaded across requests on T4

Browse files

On T4 with concurrency_limit=1, models are now loaded once globally
and persist across all sequential requests. Only Paladin models are
cleaned up after each request, while core models (CTransPath, Optimus,
Aeon, marker_classifier) remain in GPU memory.

This eliminates the overhead of reloading 8-12GB of models for every
single-slide request on T4 instances.

High-memory GPUs continue to use the previous per-batch loading strategy.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

1 file changed +24 -3
src/mosaic/ui/app.py+24-3