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.

video2motion: unthrottled CPU, one resident instance

nirholas497ecba24d8e
diff --git a/workers/model-video2motion/cloudbuild.yaml b/workers/model-video2motion/cloudbuild.yaml
index 289e7ddb2..5c006f008 100644
--- a/workers/model-video2motion/cloudbuild.yaml
+++ b/workers/model-video2motion/cloudbuild.yaml
@@ -6,10 +6,14 @@ substitutions:
_SERVICE: model-video2motion
_REPO: model-video2motion
_GCS_BUCKET: three-ws-avatar-reconstructions
- # Scale-to-zero: motion capture is a batch submit-and-poll job, not an
- # interactive edit loop — a cold start disappears inside the processing time.
- _MIN_INSTANCES: "0"
- _MAX_INSTANCES: "5"
+ # One always-on instance, instance-based billing. Processing happens in a
+ # FastAPI BackgroundTask AFTER the 202 returns, so request-based billing
+ # throttles it to near-zero CPU (a 30s clip took 3.5 h wall in prod vs 3 min
+ # unthrottled — measured 2026-07-19). min 1 keeps the instance from being
+ # reaped mid-job between polls; max 1 keeps the in-memory task store
+ # authoritative (polls always land on the instance running the job).
+ _MIN_INSTANCES: "1"
+ _MAX_INSTANCES: "1"
steps:
- id: build
@@ -49,6 +53,7 @@ steps:
- --min-instances=${_MIN_INSTANCES}
- --max-instances=${_MAX_INSTANCES}
- --timeout=900
+ - --no-cpu-throttling
- --allow-unauthenticated
- --set-env-vars=GCS_BUCKET=${_GCS_BUCKET},MAX_CONCURRENT=2,MAX_SECONDS=90
- --set-secrets=API_KEY=avatar-reconstruction-key:latest