Integrate WINK's pure-JS promptable MNIST toy #20

Open
opened 2026-11-23 16:41:50 +00:00 by dsh · 0 comments
Member

WINK has a self-contained JS toy ready to drop into the site. No API, DB, auth or build step.

Source (merged in ml-lab/wink PR #28):

Setup: copy index.html + static/ into the Flask static/template layout, keep weights.json next to worker.js (the worker fetches it relative to itself), and fix the /static/... paths if mounted under a prefix. Same-origin worker only; no SQLAlchemy or auth changes.

Standalone check:

python -m http.server 5001 -d web
# http://127.0.0.1:5001

Model: promptable MNIST, 261k params, RAT-32 10k CFG, transparent RGBA output. Digit buttons + guidance slider; ~2–4 s/sample. Numerically verified against PyTorch (~0.003 max abs forward, ~0.009 over 50 DDIM steps). Details and regeneration (web/export_weights.py) in web/README.md.

WINK has a self-contained JS toy ready to drop into the site. No API, DB, auth or build step. Source (merged in `ml-lab/wink` PR #28): - [`web/static/wink.js`](https://git.pvlb.dev/ml-lab/wink/src/branch/master/web/static/wink.js) — level-1 RAT forward + DDIM + CFG - [`web/static/worker.js`](https://git.pvlb.dev/ml-lab/wink/src/branch/master/web/static/worker.js) — loads weights once, denoises off the main thread - [`web/static/weights.json`](https://git.pvlb.dev/ml-lab/wink/src/branch/master/web/static/weights.json) — 10k CFG checkpoint bundle, 5.2 MB - [`web/index.html`](https://git.pvlb.dev/ml-lab/wink/src/branch/master/web/index.html), [`web/static/app.js`](https://git.pvlb.dev/ml-lab/wink/src/branch/master/web/static/app.js), [`web/static/style.css`](https://git.pvlb.dev/ml-lab/wink/src/branch/master/web/static/style.css) — UI Setup: copy `index.html` + `static/` into the Flask static/template layout, keep `weights.json` next to `worker.js` (the worker fetches it relative to itself), and fix the `/static/...` paths if mounted under a prefix. Same-origin worker only; no SQLAlchemy or auth changes. Standalone check: ```bash python -m http.server 5001 -d web # http://127.0.0.1:5001 ``` Model: promptable MNIST, 261k params, RAT-32 10k CFG, transparent RGBA output. Digit buttons + guidance slider; ~2–4 s/sample. Numerically verified against PyTorch (~0.003 max abs forward, ~0.009 over 50 DDIM steps). Details and regeneration (`web/export_weights.py`) in [`web/README.md`](https://git.pvlb.dev/ml-lab/wink/src/branch/master/web/README.md).
Sign in to join this conversation.
No description provided.