Who it is forA local AI user running llama-swap for chat models and ComfyUI for images on one card, who sees loads fail while the other tool holds memory.
The problemllama-swap swaps models in its own config but cannot see ComfyUI or other processes holding VRAM, so a load fails.
The outcomeEach llama-swap model runs under a Berth lease, ComfyUI waits at a job boundary, and a crashed process's PID and memory appear in `berth status`.
What you need first
- An NVIDIA GPU on Linux, or Windows 10/11 (experimental)
- Go installed for `go install`, or a release binary from the Install section
- At least one local engine, such as llama-server, ComfyUI or llama-swap
Steps
- Install Berth and run
berth service install --harbor. - Back up your llama-swap config file before changing it.
- Run
berth wire llama-swapto add the lease to every model in your config. - Restart llama-swap so the wrapped model commands take effect.
- Run
berth statusand start an image job in ComfyUI to see the handoff.
Prompt for your agent
In the Berth repo at <path to berth>, run `berth wire llama-swap` against the llama-swap config at <config path>. Expected output: each model entry is wrapped in `berth run`. Verify with `berth status` that a ComfyUI job and a llama-swap model are queued in turn rather than loading together.
Caveat. The README says an upstream llama-swap integration is planned, and until then `berth wire llama-swap` is the wrapper step you have to keep.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for T-Crypt/berth and "Share the GPU between llama-swap and ComfyUI without ping-pong"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer