Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

870 B
Raw Blame
/**
 * "Does this model fit in VRAM?" verdict, computed from the model's estimated
 * footprint against the detected VRAM. Only meaningful on GPUs we can measure
 * (NVIDIA via nvidia-smi); returns null otherwise so no misleading badge shows
 * on Vulkan/CPU where `vramGb` is unknown.
 */
export interface VramFit {
  label:     string
  className: string
}

export function vramFit(estimateMb?: number, vramGb?: number | null): VramFit | null {
  if (!estimateMb || !vramGb) return null
  const vramMb = vramGb * 1024
  if (estimateMb <= vramMb * 0.9)
    return { label: 'Fits', className: 'border-emerald-500/30 bg-emerald-500/10 text-emerald-400' }
  if (estimateMb <= vramMb)
    return { label: 'Tight', className: 'border-amber-500/30 bg-amber-500/10 text-amber-400' }
  return { label: "Won't fit", className: 'border-red-500/30 bg-red-500/10 text-red-400' }
}