ops-controller: first-class guardian GPU lease (/guardian/hold + /guardian/release)#69
Merged
Merged
Conversation
…rdian/release) The reactive ComfyUI guardian can't reliably free the 32GB card for a VibeVoice-Large render (~30GB): its 30s graceful stop races the model load and its 20s drain resumes llamacpp mid-render, so a multi-line render flaps and OOMs. Add an explicit GPU lease: - POST /guardian/hold -> stop the target (llamacpp), wait until VRAM is actually free, and set a 'held' flag so the guardian loop keeps it stopped and never resumes it. - POST /guardian/release -> clear the hold and restart the target. - guardian loop honours 'held' (keeps target down, skips queue logic) and resets a stuck 'held' state back to idle once released. Callers (the dialogue-reel render) bracket the render with hold/release for a deterministic free card: 0 OOMs, no flapping. Additive; normal guardian behaviour and existing endpoints unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds an explicit GPU lease to the ComfyUI↔llamacpp guardian:
POST /guardian/hold— stop the target (llamacpp), wait until VRAM is actually free, set aheldflag so the guardian keeps it stopped and never resumes it.POST /guardian/release— clear the hold and restart the target.held(keeps target down, skips queue logic) and resets a stuckheldstate back toidleonce released.Why
The reactive guardian can't reliably free the 32 GB card for a VibeVoice-Large render (~30 GB): its 30 s graceful stop races the model load, and its 20 s drain resumes llamacpp mid-render, so a multi-line render flaps and OOMs. Callers (the Rick/Morty dialogue-reel render) now bracket the render with hold/release for a deterministic free card — 0 OOMs, no flapping.
Safety
Additive: normal queue-driven pause/resume and all existing endpoints are unchanged. Ruff clean.
🤖 Generated with Claude Code