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.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
style: replace em-dashes in newly added comments and docs
nirholas0f25cfae3d60
diff --git a/.env.example b/.env.exampleindex 8ed4ae49c..243d93a8d 100644--- a/.env.example+++ b/.env.example@@ -1223,7 +1223,7 @@ GCP_RECONSTRUCTION_URL=MODEL_TRELLIS_URL=# workers/model-hunyuan3d → self-hosted Hunyuan3D-2 image→3D# (forge backend `hunyuan3d`, gcp provider mode `hunyuan`). NOT the same as-# GCP_RECONSTRUCTION_URL — the avatar face pipeline rejects non-face images.+# GCP_RECONSTRUCTION_URL, whose avatar face pipeline rejects non-face images.GCP_HUNYUAN3D_URL=# workers/model-triposg → sketch→3D (forge `sketch` path)GCP_TRIPOSG_URL=diff --git a/api/_mcp3d/text-to-image.js b/api/_mcp3d/text-to-image.jsindex f29a9ec9b..9c691d300 100644--- a/api/_mcp3d/text-to-image.js+++ b/api/_mcp3d/text-to-image.js@@ -580,7 +580,7 @@ export async function textToImage(prompt, { aspectRatio = '1:1', skipNim = false// Turnaround-view instructions for multi-view 3D conditioning. Each rotates the// SAME subject; the identity-preservation phrasing ("this exact same subject,// identical materials/wear/lighting") is what keeps the Gemini edit from-// redesigning the object between views — verified live 2026-07-16 (front/side/+// redesigning the object between views (verified live 2026-07-16: front/side/// back of one worn leather chair kept its chassis, scuffs and lighting).const TURNAROUND_VIEW_INSTRUCTIONS = ['Show this exact same subject in direct left side profile view (rotated 90 degrees). Keep the identical subject with identical materials, colors, wear marks and details, identical lighting, and the identical plain background. Same camera distance and framing.',@@ -589,13 +589,13 @@ const TURNAROUND_VIEW_INSTRUCTIONS = [// Synthesize additional turnaround views (side, then back) of the subject in// `primaryImageUrl` for multi-view 3D reconstruction. The self-host TRELLIS-// worker fuses up to 6 views of one asset — geometry the primary view can't+// worker fuses up to 6 views of one asset; geometry the primary view can't// see (backs, sides) stops being hallucinated when real views cover it.//// Runs only on the Vertex Gemini edit lane (image+instruction), the same GCP// credit pool as the primary reference image; there is no NIM/Replicate// fallback for edits. Strictly best-effort: any per-view failure (lane-// unconfigured, safety block, throttle) just yields fewer views — the primary+// unconfigured, safety block, throttle) just yields fewer views; the primary// view alone is always a complete input, so this can only ever add quality.export async function synthesizeTurnaroundViews(primaryImageUrl, { count = 2 } = {}) {const wanted = TURNAROUND_VIEW_INSTRUCTIONS.slice(0, Math.max(0, count));diff --git a/api/_providers/gcp.js b/api/_providers/gcp.jsindex afad9e97a..038b89c16 100644--- a/api/_providers/gcp.js+++ b/api/_providers/gcp.js@@ -366,7 +366,7 @@ function buildWorkerRequest(request) {const MODE_ETA = {reconstruct: 120,trellis: 60,- // 50-step shape diffusion + multiview paint on the L4 — much heavier than+ // 50-step shape diffusion + multiview paint on the L4: much heavier than// TRELLIS's single pass.hunyuan: 300,remesh: 30,diff --git a/api/forge.js b/api/forge.jsindex 7297c131a..589383c91 100644--- a/api/forge.js+++ b/api/forge.js@@ -1446,7 +1446,7 @@ async function startJob(req, res) {try {if (backendId === 'hunyuan3d') {// The gcp provider's `hunyuan` mode routes to GCP_HUNYUAN3D_URL- // (workers/model-hunyuan3d, /infer + /tasks/:id) — fail here only+ // (workers/model-hunyuan3d, /infer + /tasks/:id); fail here only// so an unconfigured deployment gets the branchable 501 below.if (!process.env.GCP_HUNYUAN3D_URL) throw new Error('GCP_HUNYUAN3D_URL is not set');provider = createGcpProvider();@@ -1565,8 +1565,8 @@ async function startJob(req, res) {// Multi-view conditioning: rotate the synthesized reference into side +// back turnaround views (Vertex Gemini edit lane) so the self-host// TRELLIS worker fuses real coverage instead of hallucinating the- // subject's unseen sides. Only the fusing lane benefits — every other- // reconstruct lane conditions on the primary view alone — and draft+ // subject's unseen sides. Only the fusing lane benefits (every other+ // reconstruct lane conditions on the primary view alone) and draft// keeps its single-view speed. Best-effort: a failed view just means// fewer views, never a failed generation.if (backendId === 'trellis_selfhost' && tier.id !== 'draft') {diff --git a/docs/ops/gcp-model-workers.md b/docs/ops/gcp-model-workers.mdindex 16147b0c0..5cfce9d3f 100644--- a/docs/ops/gcp-model-workers.md+++ b/docs/ops/gcp-model-workers.md@@ -26,14 +26,14 @@ result_* }` — and authenticate with one shared bearer secret.| `triposg` | `workers/model-triposg` | `model-triposg` | `sketch` | Sketch→3D (TripoSG-scribble): a drawing + a prompt naming it → untextured geometry. |All three are `provider: 'gcp'`, `free: true`. `model-trellis` and-`model-hunyuan3d` pin one always-warm instance (`_MIN_INSTANCES: "1"`) — a cold+`model-hunyuan3d` pin one always-warm instance (`_MIN_INSTANCES: "1"`): a coldFUSE-mounted weight load can stall for many minutes, and the GCP credit budgetcovers the standing GPU-hour; `model-triposg` scales to zero. A **cold start**on a scale-to-zero worker pays a one-time model-load before the job runs. Wesurface that honestly (see *Cold start*), never as a fake timer.Wire shapes: `model-trellis` and `model-hunyuan3d` both speak the standard task-shape (`POST /infer` → `{ task_id }`, `GET /tasks/:id` → `result_gcs_url`) —+shape (`POST /infer` → `{ task_id }`, `GET /tasks/:id` → `result_gcs_url`);the gcp provider drives them with modes `trellis` and `hunyuan` respectively.The Hunyuan worker also aliases `/reconstruct` + `/jobs/:id` (returning`glb_url`) for callers still on the avatar-controller contract; new code should@@ -144,10 +144,10 @@ Everything below runs on GCP credits; no third-party API is involved.1. **Prompt direction.** The Granite art-director pass runs by default on textprompts (`director: false` opts out): it rewrites the raw prompt into asingle-subject spec with photoreal-by-default material cues- (`api/_lib/forge-director-prompts.js`). Fail-soft — a dead LLM lane keeps+ (`api/_lib/forge-director-prompts.js`). Fail-soft: a dead LLM lane keepsthe raw prompt.2. **Reference image.** `textToImage()` leads with the Vertex Gemini image- model (`gemini-2.5-flash-image`) when `GOOGLE_CLOUD_PROJECT` is set —+ model (`gemini-2.5-flash-image`) when `GOOGLE_CLOUD_PROJECT` is set,materially more photoreal than 4-step distilled FLUX. `VERTEX_IMAGEN_FIRST=0`restores the legacy NIM-first order. `enhanceFluxPrompt()` appends realism +isolation cues unless the caller named an art style or composition.diff --git a/workers/model-trellis/main.py b/workers/model-trellis/main.pyindex 859965c9d..f2cd727f4 100644--- a/workers/model-trellis/main.py+++ b/workers/model-trellis/main.py@@ -331,7 +331,7 @@ async def _run_inference(slat_sampler_params={"steps": q["slat_steps"], "cfg_strength": q["slat_cfg"]},)if len(imgs) > 1:- # Turnaround views of one subject fuse into a single asset —+ # Turnaround views of one subject fuse into a single asset:# geometry the primary view can't see (backs, sides) stops# being hallucinated. 'stochastic' is upstream's default and# the cheaper of the two fusion modes.