local-vram-orchestrator

local-vram-orchestrator is a skill for Claude Code, Codex from aragaobruno/toolbelt. It costs 104 tokens per session (1,795 once invoked), scanned A, original, MIT.

Operating guidance for running several large AI models on a computer with limited graphics memory (VRAM), such as a 6GB GPU.

In plain words
What is it for?
Use it when coordinating language, speech, image, or text-to-speech models on one constrained GPU, including model loading, unloading, queues, and serialization.
Why use it?
It helps prevent CUDA out-of-memory errors by controlling which model occupies the GPU and fully freeing memory before another model runs.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when coordinating language, speech, image, or text-to-speech models on one constrained GPU, including model loading, unloading, queues, and serialization.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/aragaobruno/toolbelt/local-vram-orchestrator
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add aragaobruno/toolbelt --skill local-vram-orchestrator
Clone the repo
git clone --depth 1 https://github.com/aragaobruno/toolbelt

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for local-vram-orchestrator

README.md
[![agentmods](https://agentmods.dev/badge/skills/aragaobruno/toolbelt/local-vram-orchestrator/github.svg)](https://agentmods.dev/skills/aragaobruno/toolbelt/local-vram-orchestrator)
Your own site
<a href="https://agentmods.dev/skills/aragaobruno/toolbelt/local-vram-orchestrator"><img src="https://agentmods.dev/badge/skills/aragaobruno/toolbelt/local-vram-orchestrator/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for local-vram-orchestrator

Your own site · 80×15
<a href="https://agentmods.dev/skills/aragaobruno/toolbelt/local-vram-orchestrator"><img src="https://agentmods.dev/badge/skills/aragaobruno/toolbelt/local-vram-orchestrator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 104 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,795 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00104 $0.01795
Opus 5 $0.00052 $0.00898
Sonnet 5 $0.00021 $0.00359
Haiku 4.5 $0.00010 $0.00179

Measured 11d ago against content hash 028e92f38b5e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

local-vram-orchestrator scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/devops/local-vram-orchestrator/SKILL.md · 148 lines

How it starts

The opening of the file, as written. The whole thing — 148 lines — stays where its author put it; the contents beside it link to each section on GitHub.

local-vram-orchestrator

Operating manual for running heavy AI models on a single consumer GPU without hitting CUDA out of memory. Built for the constraint of ~6GB VRAM (RTX 4050 class) where two large models cannot coexist in memory.

Core principle: one heavy model on the GPU at a time

On 6GB you cannot hold an LLM + SD + Whisper resident simultaneously. The architecture must serialize GPU-intensive work: load → run → fully unload → load next. Concurrency is for I/O and CPU work, never for two resident models.

1. Aggressive VRAM release

torch.cuda.empty_cache() alone does not free memory still referenced by a live Python object. You must delete the references first, then collect, then empty the cache — in that order.

import gc
import torch

def release_model(model):
    """Fully evict a model from VRAM. Call before loading the next heavy model."""
    try:
        model.to("cpu")          # move weights off-GPU first (helps fragmentation)
    except Exception:
        pass
    del model                    # drop the Python reference
    gc.collect()                 # collect any cyclic refs holding tensors
    torch.cuda.empty_cache()     # return freed blocks to the driver
    torch.cuda.ipc_collect()     # release cross-process cached allocations

Common leak sources to delete explicitly: the model, the pipeline wrapper, optimizer/scheduler objects, any output tensors still in local scope, and **inputs dicts moved to CUDA. A single tensor retained in a closure or a logging list pins the whole allocation block.

# After inference, before unloading:
del outputs, inputs
gc.collect(); torch.cuda.empty_cache()

Verify, don't trust

Always confirm memory actually dropped — agent-reported "freed" is not evidence.

def vram_report(tag=""):
    a = torch.cuda.memory_allocated() / 1024**2
    r = torch.cuda.memory_reserved() / 1024**2
    print(f"[VRAM {tag}] allocated={a:.0f}MB reserved={r:.0f}MB")

Read the full file on GitHub · 148 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 148 lines · 104 tokens per session scan A 028e92f38b5e

Subscribe to this mod's changes

local-vram-orchestrator is a skill published in the GitHub repository aragaobruno/toolbelt (2 stars, last pushed 1mo ago), licensed MIT. It adds 104 tokens to every session and 1,795 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.