Skip to content

ops-controller: first-class guardian GPU lease (/guardian/hold + /guardian/release)#69

Merged
AlienWalker1995 merged 1 commit into
mainfrom
feature/guardian-gpu-lease
Jul 2, 2026
Merged

ops-controller: first-class guardian GPU lease (/guardian/hold + /guardian/release)#69
AlienWalker1995 merged 1 commit into
mainfrom
feature/guardian-gpu-lease

Conversation

@AlienWalker1995

Copy link
Copy Markdown
Owner

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 a held flag so the guardian 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.

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

…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>
@AlienWalker1995 AlienWalker1995 merged commit 2d121da into main Jul 2, 2026
4 checks passed
@AlienWalker1995 AlienWalker1995 deleted the feature/guardian-gpu-lease branch July 2, 2026 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant