start_diffusion_training freed resident GPU models and only then called service.start(config), which is where is_active() first flips true. During that free-then-spawn window a concurrent /images/load or /video/load saw training as inactive, passed its training guard, acquired the GPU, and began a background load, so the trainer and that pipeline both allocated VRAM. Add reserve()/unreserve() to the training service (is_active() also reports the reservation) and reserve BEFORE the free, in a try/finally so a failed start rolls the reservation back. An overlapping load's guard now refuses during the window. Regression tests: the route reserves before the free (and the free sees an active service), and the service reservation marks active then rolls back. |
||
|---|---|---|
| .. | ||
| backend | ||
| frontend | ||
| src-tauri | ||
| __init__.py | ||
| install_llama_prebuilt.py | ||
| install_node_prebuilt.py | ||
| install_python_stack.py | ||
| install_sd_cpp_prebuilt.py | ||
| LICENSE.AGPL-3.0 | ||
| node_prebuilt_pins.json | ||
| package-lock.json | ||
| package.json | ||
| setup.bat | ||
| setup.ps1 | ||
| setup.sh | ||
| Unsloth_Studio_Colab.ipynb | ||