mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #3110] vhotseat: Strata and ComfyUI take turns on one GPU, so a local agent can render video on the same card it runs on #1243
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#1243
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @wandermyz on GitHub (Oct 18, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3110
vhotseat is a small tool that runs next to Strata and ComfyUI on the same PC. It makes them take turns on VRAM and RAM, so a local agent served by Strata can queue image and video renders on the card it runs on, with no out-of-memory errors. ComfyUI is just the example: any other GPU job (a training run, a simulation, a script) can take turns with Strata the same way by running it as
vhotseat hold NAME -- COMMAND. Linux and NVIDIA, Python 3.10+, one dependency (PyYAML), MIT: https://github.com/wandermyz/vhotseatThe problem. On a 16 GB card, Strata holds ~14.7 GB of VRAM and ~44 GB of RAM for Flash-Next IQ3_XXS, and a MiniMax H3 video render needs ~14 GB of VRAM. When the agent queues a render, one of them runs out of memory.
How it uses Strata. Strata's
before_loadhook runsvhotseat gate strata. Strata's lazy load and idle unload do the rest:vhotseat switch comfybefore every job. It waits for any answer Strata is writing, then unloads Strata.before_loadhook asks vhotseat first. While ComfyUI still has jobs queued or running, it refuses, and the agent's harness retries the 503. Once ComfyUI is idle, vhotseat frees its models (and restarts it if its leftover RAM is in the way), then lets Strata load.Nothing else is changed in Strata: only the
before_loadkey in the run config. Any client is covered (the agent, its scripts, the ComfyUI web page, curl), because nobody calls vhotseat; each side asks for the GPU right before it loads.Demo
Setup: RTX 5070 Ti 16 GB, 64 GB RAM, Linux. Strata serving Qwen3.8-Flash-Next IQ3_XXS at 128K context, pi as the agent, MiniMax H3 (int8
fl2va) in ComfyUI.The prompt to pi:
pi did it unattended, in two render rounds.
Round 1. pi wrote the job files and rendered two takes (two seeds) in one batch, which took 3 min 41 s. Strata was unloaded for the batch.
Review. Strata loaded again. pi built a contact sheet of both takes, looked at it with Flash-Next's vision, and picked take A, because "B substitutes a butterfly for the bird".
Round 2. pi took the last frame of take A as the first frame of the jump and rendered two takes, which took 5 min 38 s.
Review and finish. Strata loaded again. pi picked the take with a real leap, then joined the two clips with ffmpeg.
That's four GPU handovers, and no OOM.
The final video (6.8 s, 1344×768):
https://github.com/user-attachments/assets/4dc4e40d-caa6-4433-b654-718713c981cd
vhotseat webshows the same session. The GPU goes to ComfyUI at 02:10 and 02:16, and comes back to Strata at 02:14 and 02:21. Each time Strata loaded, vhotseat freed ComfyUI's 13.9 GB of models first. Strata's RAM goes from ~44 GB down to almost nothing while ComfyUI renders, then back.Try it
Or give this sentence to a coding agent on the PC where Strata runs:
vhotseat doctorchecks the config, the GPU and both gates;vhotseat statusshows who holds the GPU.It writes only to Strata's run config (the
before_loadkey) and its own config. The ComfyUI side is one custom node.Not tested: Windows (designed for, not done yet), AMD, Intel and Macs. Other servers (another LLM server, a TTS server, a training run) can join through a config entry or a small driver.
Feedback is welcome here or in the vhotseat repository, especially reports from other cards and setups.
@Niko1221 commented on GitHub (Oct 19, 2026):
Thanks for taking the time to report this.
We're resetting the tracker for 0.2.0-beta. There are more than 1,300 open issues and pull requests, too many for us to read properly, so we're closing everything that isn't being worked on right now. Closed here does not mean rejected.
To reopen it takes about two minutes:
/reopen. A check runs and either reopens the issue or lists what is still missing.The rules are in CONTRIBUTING.md.