Spaces:
Runtime error
Runtime error
Commit History
-
Stream volumes by URL, cache checkpoints, reclaim archive space, quiet logs
Stream the viewer payload instead of inlining it. render_viewer() now hands niivue a /gradio_api/file= link resolved against document.baseURI, rather than base64-encoding the volume and mask into the page. A 46 MB CT was becoming ~61 MB of HTML built and shipped synchronously; measured on a test volume the payload drops 58x. app.launch() gains allowed_paths for the output dir. NV_GENERATE_VIEWER_MODE=base64 restores the old path if a deployment blocks file serving. Cache checkpoints across runs. scripts/inference.py issues five torch.load() calls per CT generation -- ~3.35 GB re-read and re-deserialised every time. _cached_torch_load() memoises them by (path, size, mtime) with LRU eviction under a byte budget (NV_GENERATE_CKPT_CACHE_GIB, default 8). This is host RAM, not VRAM: CT's weights are ~3.35 GB against a 96 GB xlarge slice, so VRAM was never the limit -- the 48-80 GB figure is activations, not parameters. Reclaim the mask archive. Once extracted, the 11.6 GB .zip is never rea…f265752