You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
wasm scan demo: load the layout model same-origin (release assets aren't CORS-fetchable)
GitHub Release assets are served from release-assets.githubusercontent.com
with no Access-Control-Allow-Origin header, so a browser fetch of the
layout model failed with a CORS error the moment the URL stopped 404ing.
The recognition models avoid this only because Hugging Face sends CORS
headers; the official docling-layout-heron-onnx on HF can't substitute —
it exports a different contract (images + orig_target_sizes in,
labels/boxes/scores out) than our decode_layout expects (raw
logits/pred_boxes).
So load the layout model from the page's own origin: prefer
./layout_heron_int8.onnx (~68 MB), fall back to ./layout_heron.onnx
(~172 MB), and if neither is present open a setup note explaining how to
fetch them (download_dependencies.sh) and drop one next to the page.
These are the exact conformance-validated exports the native pipeline
uses; *.onnx is already gitignored so the copied model isn't committed.
Refs #157
Signed-off-by: artiz <artem.kustikov@gmail.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EY5KAiquN4YpVf2PXEQkVT
0 commit comments