Skip to content

Add F06_MUSE spec: in-browser avatar illustrator - #32

Merged
tatangharyadi merged 6 commits into
mainfrom
docs/tatangharyadi/f06-muse-spec
Aug 15, 2026
Merged

Add F06_MUSE spec: in-browser avatar illustrator#32
tatangharyadi merged 6 commits into
mainfrom
docs/tatangharyadi/f06-muse-spec

Conversation

@tatangharyadi

Copy link
Copy Markdown
Owner

Summary

  • Design-only spec for a client-side rebuild of Draft's rotating-avatar feature: photo upload → MediaPipe-detected face → SD-Turbo-stylized portrait → 5 head-rotation poses crossfaded on cursor movement.
  • Reuses the already-vendored MediaPipe Face Landmarker for face detection (no new vendoring there).
  • Argues the site's first same-origin exception for an ML dependency: the stylization model (~2.58GB unquantized per the HF repo listing) is far too large to vendor under this repo's existing committed-asset precedent, so it's fetched at runtime from a pinned Hugging Face revision behind a scoped CSP allowlist instead.
  • Explicitly flags three unverified premises in a "Pending" section before implementation can start: whether img2img is actually achievable with this model in a browser (the reference example is text-to-image only), the model's real fetched size, and real-hardware inference latency.
  • Adds a matching F06 entry to specs/PRD.md's feature list, status "proposed, not implemented".

No code changes — this is a design document only, following the F0N_NAME.md template F05_IRIS.md established.

Test plan

  • N/A — Markdown-only change; CI's sitemap/nav/palette checks are unaffected since no .html page was added yet.

Design-only spec for a client-side rebuild of Draft's rotating-avatar
feature: photo upload, MediaPipe reuse for face detection, and a
runtime-fetched (not vendored) SD-Turbo diffusion model for stylization
and reposing. Argues the site's first same-origin exception for an ML
dependency, since the model is far too large to vendor under existing
precedent. Flags img2img feasibility, real download size, and real-
hardware latency as unverified premises pending a working prototype.
Prototyped the vae_encoder path in a real browser session, resolving
F06-AC01 from unverified to confirmed. Surfaces two new findings: the
encoder's inputs/outputs are float16-only (undocumented), and this
build's WebGPU EP has no fp16 Clip kernel for it, forcing a ~52s wasm
fallback that is now the dominant latency cost for AC03.
Re-ran the img2img prototype against onnxruntime-web 1.20.1 instead
of the reference demo's stale 1.18.0-dev pin. PR #21584 (merged
2024-08-28, shipped in 1.19.2+) added the missing fp16 WebGPU Clip
kernel: vae_encoder now runs on WebGPU in 595ms with no CPU fallback,
and the full pipeline completes in ~2.5s. Only remaining premise is
confirming that number on real consumer hardware.
The prototype's browser automation runs on this machine, not an
isolated sandbox. Confirmed hardware via system_profiler and the
WebGPU adapter info, then re-ran the full pipeline twice: ~2-2.5s
total end-to-end, all four sessions on WebGPU. Noted as a best-case
number since an M4 Pro is a premium device, not the low end of
"ordinary hardware."
@tatangharyadi
tatangharyadi merged commit 6c3cb27 into main Aug 15, 2026
2 checks passed
@tatangharyadi
tatangharyadi deleted the docs/tatangharyadi/f06-muse-spec branch August 15, 2026 07:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant