Back to projects
Musetta
An AI image and video studio on top of your own ComfyUI. Its agent, the Brain, does the setup and repairs broken workflows.
- Role
- Design and build, side project
- When
- Jul 2026 to now
- Status
- Live, 7-day trial and paid plans
- Stack
- TypeScript, Next.js, Hono, PostgreSQL, SQLite, Electron

The problem
A shared ComfyUI workflow usually needs custom nodes and model files you don't have. Finding them by hand takes a while, and on a rented GPU every minute costs money.
What I built
- The Brain. It compares a workflow against what ComfyUI reports through /object_info and maps each missing node to its exact pack. When it can't find a file, it asks.
- GPU orchestration. Rented machines on Vast.ai with idle auto-stop, a machine-side lease, cost accounting and cleanup of orphaned instances.
- AI gateway. Hono and PostgreSQL with entitlement auth, SSE pass-through, a usage ledger and daily caps per IP, per user and globally.
- Desktop and browser. A notarized Electron app for macOS with auto-updates over Cloudflare R2, and a Chrome extension with scoped tokens.


Hard parts
- Money. An agent that can rent GPUs can also burn money. Nothing spends before a valid machine exists, held runs are claimed with compare-and-swap, and spend ceilings sit on top. A charge we can't know is stored as null, never as 0.
- Trust. The agent resolves missing packs on rented machines, so repo URLs pass a trust boundary first. It can't install without proof.
- Release security. I wrote a security audit of the Electron release, covering fuses, asar integrity and secrets in the OS keychain.
How I built it
I built it with heavy use of Claude Code. I planned the architecture and read every diff.
NextTypilot