Skip to content

Commit a38baa0

Browse files
artizclaude
andcommitted
wasm scan demo: fetch the layout model that models-v1 actually hosts
The demo pointed at layout_heron_int8.onnx, but the release only hosts the fp32 layout_heron.onnx (172 MB) — the int8 variant is produced locally by scripts/install/quantize_models.py and was never uploaded, so the page died on a 404 before ever becoming ready. 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
1 parent c01d0d0 commit a38baa0

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

crates/docling-wasm/www/scan.html

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
<h1>docling.rs → wasm: scanned PDF / image, full lite profile</h1>
4242
<p>
4343
Stage 2 of <a href="https://github.com/docling-project/docling.rs/issues/157">#157</a>:
44-
RT-DETR layout detection (int8, ~165&nbsp;MB — cached after the first load)
44+
RT-DETR layout detection (~172&nbsp;MB — cached after the first load)
4545
+ PP-OCRv3 recognition via ONNX Runtime Web; pdf.js rasterizes PDF pages
4646
at the native pipeline's 2&nbsp;px/point; region refinement, OCR and
4747
reading-order assembly run in Rust/wasm — the same code as the native
@@ -70,8 +70,11 @@ <h1>docling.rs → wasm: scanned PDF / image, full lite profile</h1>
7070
pdfjs.GlobalWorkerOptions.workerSrc =
7171
"https://cdn.jsdelivr.net/npm/pdfjs-dist/build/pdf.worker.min.mjs";
7272

73+
// The models-v1 release hosts only the fp32 layout export (the int8
74+
// variant is produced locally by scripts/install/quantize_models.py and
75+
// was never uploaded) — fetch what is actually there.
7376
const LAYOUT_URL =
74-
"https://github.com/docling-project/docling.rs/releases/download/models-v1/layout_heron_int8.onnx";
77+
"https://github.com/docling-project/docling.rs/releases/download/models-v1/layout_heron.onnx";
7578
const SCALE = 2.0; // px per PDF point — the native pipeline's RENDER_SCALE
7679

7780
const meta = document.getElementById("meta");
@@ -99,7 +102,7 @@ <h1>docling.rs → wasm: scanned PDF / image, full lite profile</h1>
99102
}
100103

101104
// fetch() with a live "x / y MB" status line (falls back to a plain fetch
102-
// when the body can't be streamed) — the 165 MB layout model would
105+
// when the body can't be streamed) — the 172 MB layout model would
103106
// otherwise sit on a static message for minutes on a first visit.
104107
async function fetchProgress(url, label) {
105108
const resp = await fetch(url, { cache: "force-cache" });

0 commit comments

Comments
 (0)