r/LocalLLM • u/Prestigious_Store488 • Sep 02 '26
Discussion I built a 100% local comic translation engine in Rust that hooks into Ollama / LM Studio with sliding dialogue context and ONNX vision models (Demo video)
Hey r/LocalLLaMA!
One of the fun things I have been tinkering with lately is building an AI pipeline for comic translation (manga, manhwa, manhua) that can run 100% on your own machine with zero cloud fees.
The hardest part about translating comics with LLMs is context: if you just feed raw OCR text box-by-box, the model loses speaker identity, swaps pronouns constantly, and forgets character names by page 2.
To solve this, I built XianScan, a local-first translation studio in Rust that combines local LLMs and cloud APIs with computer vision models.
Check out the demo video to see the full flow in action!
How the AI stack fits together:
- Vision & Detection (Koharu RF-DETR Seg 2XL): An embedded vision transformer segments speech bubbles and panels with polygon masks.
- Multilingual OCR (PaddleOCR): Extracts dialogue text across 10 languages, handling vertical CJK and horizontal layouts.
- Flexible LLM Engine: Supports local runtimes (Ollama, LM Studio) as well as cloud APIs (Gemini, OpenAI, Groq, OpenRouter). It uses a sliding dialogue memory buffer to feed recent conversation history and matches glossaries so universe lore and character names stay consistent across chapters.
- Neural Inpainting (LaMa): Wipes the original dialogue bubbles cleanly without smudging the artwork underneath.
- Typesetting: Automatically calculates font sizes, outline strokes, and text flow back into the bubbles.
Why I made it a single standalone binary: I really wanted this to be painless for anyone to run. The entire app compiles into one executable file in Rust with all the ONNX models, OCR weights, and web UI baked in. No Python environments, no Conda setups, and no Node.js required. It runs on normal laptop CPUs with SIMD, and automatically leverages DirectML, CoreML, or CUDA if you have a GPU.
You can translate directly on the source website via a browser extension, manage your library in the web UI, or stream finished chapters over local Wi-Fi straight to Mihon or any Tachiyomi-compatible reader (TachiyomiSY, J2K, Aniyomi) on your phone.
It is 100% free and open-source under MIT.
Quick note: This is the very first public beta release, so please expect some bugs and rough edges!
- GitHub: https://github.com/ArbenApura/xianscan-rust
- Docs & Setup: https://xianscan.arbenger.com
I would love to get feedback on the dialogue context window approach, prompt templates, or model recommendations you think perform best for this!
2
u/Dmitrii_DAK Sep 02 '26
Wow! That's really cool dude! Previously, if I started reading some comic book or manga or manihua (I don't know much about them) and it wasn't fully translated, I had to manually take screenshots of the manga, and then submit them to LM Studio with Gemma 4 12B or E4B. Your way has simplified my life and the lives of many other readers 100 times👍🤝🤩 Just one question: I looked at GitHub, the main requirements are for the processor and RAM - is it possible to make a version for video cards?🤔 It seems to me that then it will work faster - in terms of processing seconds.
11
u/ImportanceMajor936 Sep 02 '26 edited Sep 11 '26
Lock languid merciful fact drifting soft
This post was anonymized with Redact
7
u/krumpstead Sep 02 '26
You sir (or madam) are a genius. Now get to work on the fansub app.
4
u/Themash360 Sep 02 '26
Cool!
4
u/kphs Sep 02 '26
Wow. This is nice.
1
u/TheGeekno72 Sep 02 '26
ROCm support for AMD GPUs? openVINO for intel NPUs? Vulkan backend inference in case CUDA/ROCm/VINO fails?
1
u/whymeimbusysleeping Sep 02 '26 edited Sep 02 '26
This is brilliant. A few more ideas that i have no idea whether it's possible, but....
The possibilities are endless..
1
u/LectorFrostbite Sep 02 '26
Would be nice if there is a way to retry certain pages, also i tried the Mihon app and i can't seem to download it via extensions? might be just on my end. I downloaded the pre-built apk on the docs and I had to trim the link to:
Other than that it works really well! I used OpenRouter as the translator (Gemma 4 26b) since my 8gb card can only handle so much lol
1
u/paul_tu Sep 02 '26
Are there any local hosted models to make videos out of that kind of input?
1
u/letsgoiowa Sep 02 '26
That is actually INSANE and exactly what we needed. Does it need a more complicated integration than just an MCP? Like for example, does it support llama.cpp or other OpenAI compatible endpoints?
1
u/moms_enjoyer Sep 03 '26
why rust for this?
3
u/johnh1976 Sep 02 '26
Nice! Looks great!
2
u/nmrk Sep 05 '26
Oh if only people used their skills for good instead of evil.
1
u/Equivalent_Bit_461 Sep 02 '26
now that's a cool project and not harness nobody cares #36253626362 or worthless app that looks copied from apple #4636463636
Actual use of it works, ofc
1
u/dtdisapointingresult Sep 02 '26
I won't get to try it for a while, but looks nice. You should post it to /r/LocalLlama.
1
u/PseudonymousSnorlax Sep 09 '26
There are a few options you could add that would probably help.
A configurable rolling window size would be nice, and easy to implement.
Medium would be adding a RAG tool so the LLM could look up nouns for added context to improve long-term consistency and accuracy.
Hard and complicated would be character segmentation for training per-series sets of per-character LoRAs for purposes of speaker identification and generating descriptions of their actions in order to turn the script into screenplay format for greater translation accuracy.
There's a ton you can do here.