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.

fix(avatar-recon): bundle face_geometry.py in the image + build-time morph guard

nirholas0905646ecece
diff --git a/docs/avatar-pipeline.md b/docs/avatar-pipeline.md
index 81153bad8..c1f5dcf31 100644
--- a/docs/avatar-pipeline.md
+++ b/docs/avatar-pipeline.md
@@ -90,6 +90,7 @@ pose operations.
## Related
+- [Selfie → Avatar reconstruction](avatar-reconstruction.md) — the separate lane that fits a *person's photo* onto a rigged template (face texture + geometry morph), rather than generating a mesh from a prompt.
- [Animations](animations.md) — the clip library and retargeting in depth.
- [3D asset pipeline](3d-asset-pipeline.md) — formats, optimization, validation.
- [NVIDIA free models](nvidia-models.md) — the free generation backend.
diff --git a/workers/avatar-reconstruction/Dockerfile b/workers/avatar-reconstruction/Dockerfile
index ef04edce9..da155a6d3 100644
--- a/workers/avatar-reconstruction/Dockerfile
+++ b/workers/avatar-reconstruction/Dockerfile
@@ -31,8 +31,10 @@ WORKDIR /app
COPY worker_security.py /app/worker_security.py
COPY main.py /app/main.py
COPY face_pipeline.py /app/face_pipeline.py
+COPY face_geometry.py /app/face_geometry.py
COPY glb_ops.py /app/glb_ops.py
COPY precompute_uv.py /app/precompute_uv.py
+COPY test_face_geometry.py /app/test_face_geometry.py
# ── Template GLBs ─────────────────────────────────────────────────────────────
# Bake both gender variants into the image so cold starts are instant.
@@ -47,6 +49,12 @@ COPY templates/ /app/templates/
# Requires network access during build (downloads ~200 KB OBJ from GitHub).
RUN python /app/precompute_uv.py /app/templates/default.glb
+# ── Build-time guard ──────────────────────────────────────────────────────────
+# The geometry morph must preserve the rig + 52 ARKit blendshapes and never blow
+# up the mesh. Fail the image build if the morph math regresses, rather than
+# shipping a broken avatar pipeline.
+RUN python /app/test_face_geometry.py
+
EXPOSE 8080
# Two workers: CPU pipeline parallelism; GPU is shared via process-level mutex