{
 "schema_version": 1,
 "generated": "2026-10-20",
 "id": "t-crypt-berth--share-gpu-between-llama-swap-and-comfyui",
 "repo": "T-Crypt/berth",
 "repo_url": "https://github.com/T-Crypt/berth",
 "repo_slug": "t-crypt-berth",
 "title": "Share the GPU between llama-swap and ComfyUI without ping-pong",
 "page_title": "How to share the GPU between llama-swap and ComfyUI without ping-pong with Berth",
 "summary": "Put llama-swap's models and ComfyUI under one lease so a model swap waits for the image job.",
 "who": "A 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.",
 "problem": "llama-swap swaps models in its own config but cannot see ComfyUI or other processes holding VRAM, so a load fails.",
 "outcome": "Each 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`.",
 "steps": [
  "Install Berth and run `berth service install --harbor`.",
  "Back up your llama-swap config file before changing it.",
  "Run `berth wire llama-swap` to add the lease to every model in your config.",
  "Restart llama-swap so the wrapped model commands take effect.",
  "Run `berth status` and start an image job in ComfyUI to see the handoff."
 ],
 "agent_prompt": "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.",
 "agents": [
  "any"
 ],
 "difficulty": "Intermediate",
 "time": "45 minutes",
 "basis": "readme",
 "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.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "go",
 "requirements": [
  "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"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": false,
 "score": 0.8,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/t-crypt-berth/share-gpu-between-llama-swap-and-comfyui/",
 "md": "https://dedupedai.com/use-cases/t-crypt-berth/share-gpu-between-llama-swap-and-comfyui/index.md",
 "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 hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/t-crypt-berth--share-gpu-between-llama-swap-and-comfyui.json",
 "api_version": "v1"
}
