open-standards/wai/.gitignore
Transaction Science 89e0da789e wai: compact binary model + in-browser conditional-codec demo
Makes the in-browser decode of the full conditional codec practical: the model
shrinks from ~52MB JSON to ~23.5MB binary (~15.5MB gzipped on the wire), and a
real HTML page decodes a SOTA-class learned codec in the browser, verifying its
hash against the native reference.

- typed IntModel: refactored run_net/decode/decode_conditional off serde_json
  Value onto an IntModel { afrac, gf, shift, layers: Vec<IntLayer> }, built by
  either IntModel::from_json (existing schema) or IntModel::from_bytes (compact
  binary: magic WHM1, int12 weights as i16, IGDN gamma as i32, the rest i64).
  Decode is byte-identical whichever the source.
- export tool writes *_model.bin alongside the JSON (model_to_bin).
- conformance: the binary model decodes byte-identically to JSON (new assert in
  tests/int_hyper_synth.rs); all 3 tests green in release (~11s, the 100s was
  debug — release wasm decode is ~10s).
- wasm: decodeIntHyperBin (binary path) beside decodeIntHyper (JSON); shared
  cond_decode helper. demo/verify_int_hyper_wasm.mjs checks both paths.
- demo/int_hyper.html + .js: fetch the binary models + 1.4KB bitstream, decode
  with pure-i64 wasm (no ML runtime), paint the canvas, FNV-1a the RGB against
  cond.json. Verified in headless Chrome: 256x256, 42.61 dB, decoded hash
  adeb12d347d0bf7e == native, ~10s decode, zero console errors.

The PTQ model files are large and NOT committed (gitignored demo/int_hyper/);
regenerate with tools/wai_sota_int_synth_export.py. pkg/ stays a build artifact.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-06-25 03:14:46 -04:00

59 lines
1.7 KiB
Text

# Test corpora — 22 GB, far over GitHub's 100 MB/file limit. Never commit.
# Fetch scripts belong in-repo; the data does not.
/corpus/
# Rust build output (any crate)
target/
**/target/
/wai-rs/target/
/wai-web/target/
/byte-exact-conformance/target/
/wai-relay/target/
/wai-spz-gen/target/
# Vendored reference software — cloned out-of-band, not WAI source (~935 MB).
/jpeg-ai-ref/
# Large exported model / fixture assets — sink-supplied, archived out-of-band (~360 MB).
/jpegai-vm-assets/
# Neural model bundles for the browser demo. These are large (~120 MB
# per model) and regenerable: run `python3 tools/wai_encodec_export_onnx.py`
# against a local EnCodec checkpoint to produce them. See
# wai-web/demo/models/README.md.
/wai-web/demo/models/**/*.onnx
/wai-web/demo/models/**/*.bin
# Python
__pycache__/
*.pyc
*.pyo
.venv/
venv/
# Local codec output / scratch artifacts (regenerable)
*_out.png
/wai/i_out.png
/wai-neural/*.png
/wai-neural/err.log
# OS noise
.DS_Store
# Raw design transcripts — kept on disk for reference, not part of the
# repo's public surface (the coherent narrative is README.md + SPEC.md).
/notes-1.md
/notes-2.md
# Keep: SPEC.md, README.md, LICENSE, wai/, wai-rs/ (src + tests/fixtures),
# wai-neural/ source, the small *.wai sample bundles.
wai-web/demo/scpkg/
# wasm-pack build outputs (rebuilt by wasm-pack / demo/verify_int_synth.sh).
wai-web/demo/pkg/
wai-web/demo/pkg-node/
# int_hyper conditional-codec demo artifacts (PTQ model + bitstream, large —
# regenerated by tools/wai_sota_int_synth_export.py into demo/int_hyper/).
wai-web/demo/int_hyper/
# Reference codec tools built by tools/build_reference_decoders.sh (sink decoders, fetched out-of-band).
/.reference-tools/