Tara Models
ONNX models for Tara - browser-native visual document translation.
Models
| Model | File | Size | Source | Changes |
|---|---|---|---|---|
| RT-DETR-v2 (detector) | detector.onnx | 161 MB | ogkalu/comic-text-and-bubble-detector | Patched AveragePool ceil_mode=0 for WebGPU compatibility |
| LaMa (inpainter) | lama-manga-dynamic.onnx | 197 MB | ogkalu/lama-manga-onnx-dynamic | No changes, original model |
| LaMa (inpainter, simplified) | lama-manga-dynamic-sim.onnx | 196 MB | ogkalu/lama-manga-onnx-dynamic | Simplified offline (onnx-simplifier, then ONNX Runtime basic graph optimisation); bit-identical output, h/w still dynamic |
Why this repo?
The original detector.onnx uses AveragePool with ceil_mode=1, which onnxruntime-web's WebGPU backend does not support. This repo hosts a patched version where ceil_mode is set to 0. Since all AveragePool nodes use kernel=2x2 stride=2 on even-dimension inputs (640x640), this change has no effect on output.
The LaMa inpainter works as-is and is included here for convenience (single download source).
lama-manga-dynamic-sim.onnx is the same LaMa with its graph simplified: onnx-simplifier folds the 3,379 Constant nodes and redundant shape ops, then ONNX Runtime's basic optimisation (constant folding, redundant node elimination) is saved to the file. The graph goes from 10,239 to 5,322 nodes; the output is bit-identical to the original (max abs diff 0.0 on CPU at several sizes). Creating the session is faster because ONNX Runtime's execution planner scales with the node count: 11.8 s to 6.9 s with onnxruntime-web on WebGPU, 7.9 s to 5.2 s with onnxruntime-node on DirectML (RTX 3070 Ti). Tara uses this file; the original stays for older versions.
Usage
These models are loaded by Tara via the browser Cache API. On first visit, the app downloads both models (~360 MB total) and caches them locally. Subsequent visits load from cache instantly.
Direct download URLs:
- https://huggingface.co/QuatZo/tara-models/resolve/main/detector.onnx
- https://huggingface.co/QuatZo/tara-models/resolve/main/lama-manga-dynamic-sim.onnx (used by Tara)
- https://huggingface.co/QuatZo/tara-models/resolve/main/lama-manga-dynamic.onnx (original)
License
Original models by ogkalu. See the source repositories for license information.