
# XianScan
**Local-first translation studio for manga, manhwa, and manhua.**
Speech bubble detection, multi-language OCR, LLM translation, neural inpainting, and typesetting built with Rust & ONNX Runtime.
Documentation & Showcase: [**xianscan.arbenger.com**](https://xianscan.arbenger.com/)
[](LICENSE)
[](https://www.rust-lang.org/)
[](https://onnxruntime.ai/)
[](https://learn.microsoft.com/en-us/windows/ai/directml/)
[](https://kit.svelte.dev/)
[](#browser-web-extension)
[](#mihon--tachiyomi-extension-android)
[](https://ko-fi.com/arbenapura)
| 1. Raw Source | 2. Neural Inpainted | 3. Translated & Typeset |
| :---: | :---: | :---: |
|

|

|

|
Showcase artwork from 《妖神记》 (Tales of Demons and Gods) used for technical demonstration. All copyrights belong to the respective authors and publishers.
**Format Benchmarks:** [Chinese Manhua](docs/showcase-manhua.md) • [Korean Manhwa & Webtoons](docs/showcase-manhwa.md) • [Japanese Manga](docs/showcase-manga.md)
## Overview
**XianScan** is a self-contained, local-first comic translation server built in Rust. It eliminates the manual busywork of screenshotting, external OCR, Photoshop cleaning, and manual typesetting by orchestrating the entire lifecycle in a single automated flow: from 1-click web reader import to streaming translated chapters directly to your mobile reader over local Wi-Fi.
> [!TIP]
> **Choosing the Right Tool for Your Workflow**
> - **XianScan (Automated Reading Flow)**: Built specifically for readers and fast chapter catch-up. Delivers an automated 1-click pipeline (browser import -> OCR -> inpainting -> LLM translation -> typesetting -> Mihon streaming) packaged in a self-contained zero-install standalone binary.
> - **Koharu (Comprehensive Translation Studio)**: If you need an end-to-end desktop editor with multi-format project management, proofreading, a WebGPU-based canvas for manual cleanup, and layered PSD export, check out [Koharu](https://github.com/mayocream/koharu).
### Key Architectural Pillars
- **Zero-Friction Standalone Executable**: Ships as a single self-contained binary containing all ONNX neural models, OCR dictionaries, Skia graphics rendering, and the SvelteKit web interface. No Python environment, Conda setups, or external runtime installations required.
- **Automated End-to-End Pipeline**: Handles image downloading, high-resolution speech bubble detection, multi-language OCR, neural text removal (LaMa), context-aware LLM translation, and automated typography layout.
- **Hardware Agnostic with CPU-First Optimization**: Tuned for multi-threaded SIMD inference (AVX2, AVX-512, ARM NEON) that runs smoothly on standard laptops and CPUs, while automatically taking advantage of DirectML (Windows), CoreML/Metal (macOS), or CUDA (Linux) when a dedicated GPU is available.
- **Seamless Ecosystem Integration**: Capture chapters from online reader platforms via the 1-click browser extension, and read finished chapters anywhere on your home network through the dedicated Mihon / Tachiyomi extension.
---
## Translation Pipeline & Core Capabilities
```mermaid
flowchart LR
A["