LichtFeld-Studio fix turns documented GPU memory leak into reload policy

janusch_patas · x · 2026-10-21

A PR by januschpatas was merged into MrNeRF/LichtFeld-Studio, fixing issue #1487: every plugin manifest had to declare hotreload, but the value was parsed into PluginInfo and never read — the file watcher reloaded changed plugins regardless.

This mattered because the code itself documents that reloading is unsafe for GPU plugins: PyTorch models cannot be safely unloaded (corrupts the shared CUDA context), so reloads keep old models in memory and leak GPU memory on each reload, with warnings above 10 MB per reload.

The 15-line fix: hotreload=true keeps current behavior; hotreload=false makes the watcher mark the plugin stale with a "restart required" message instead of reloading; defaults to false when the manifest declares a GPU-touching feature.

Original post →

More from coding & agent

coding & agent channel →