DEDUPED Hot AI repos, turned into use cases Get 5 a day

How to share the GPU between llama-swap and ComfyUI without ping-pong with Berth

Put llama-swap's models and ComfyUI under one lease so a model swap waits for the image job.

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

  1. Install Berth and run berth service install --harbor.
  2. Back up your llama-swap config file before changing it.
  3. Run berth wire llama-swap to add the lease to every model in your config.
  4. Restart llama-swap so the wrapped model commands take effect.
  5. Run berth status and 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.

Share: X LinkedIn Hacker News Email Copy link

Disclaimer

Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked "Seen in the wild", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email [email protected] and we will look at it promptly. Full disclaimer page