Downloads · 30 days
0
Dinamus/manga-translator
manga-translator is a translation model from Dinamus. Use it when you need text moved from one language to another. The card lists the license as mit.
Batch manga page translator (JP→EN first) with free/local models.
Downloads · 30 days
0
Access
Public
Updated Aug 7, 2026
Repo size
—
Likes
0
Public
Click a slice to open those files.
.json246 KB · 48%
From the Hugging Face model README
Batch manga page translator (JP→EN first) with free/local models.
Stack: Python FastAPI worker + Next.js UI. Phase 1 ships detect → OCR → translate → overlay preview. Phase 2 adds inpaint + typeset for finished visual pages.
Separate from Dinamus/ml-danbooru-onnx-repo (image tagging / folder routing).
manga-ocr when MANGA_TRANSLATOR_REAL_MODELS=1, else stub)opus-mt-ja-en when real models, else stub)cd backend
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -e ".[dev]"
pytest
uvicorn manga_translator.api.app:app --reload --port 8000
CLI:
manga-translator translate-batch .\path\to\pages
cd web
npm install
$env:NEXT_PUBLIC_API_BASE="http://127.0.0.1:8000"
npm run dev
Open http://localhost:3000 — upload pages, poll job progress, preview side-by-side, download zip.
Torch installs into the long project .venv path can fail with WinError 206. Prefer a short venv:
python -m venv C:\mtvenv
C:\mtvenv\Scripts\python -m pip install -e ".[ml]"
C:\mtvenv\Scripts\python -m pip install -e .
$env:MANGA_TRANSLATOR_REAL_MODELS="1"
$env:MANGA_TRANSLATOR_OCR_BACKEND="manga_ocr"
$env:MANGA_TRANSLATOR_TRANSLATE_BACKEND="opus_mt"
C:\mtvenv\Scripts\python -m uvicorn manga_translator.api.app:app --port 8010
Checklist: docs/CHECKLIST-p1-ui-local-models.md
Optional, fully local quality controls modeled on production scanlation tools:
# Glossary: preserve names/terms (only entries present in the page are sent to the LLM)
$env:MANGA_TRANSLATOR_GLOSSARY_PATH="data/dict/glossary.json" # {"太郎":"Taro"}
# Pre-dict: fix OCR artefacts / strip SFX BEFORE translation (ordered regex rules)
$env:MANGA_TRANSLATOR_PRE_DICT_PATH="data/dict/pre_dict.example.json"
# Post-dict: fix recurring MT phrasing AFTER translation
$env:MANGA_TRANSLATOR_POST_DICT_PATH="data/dict/post_dict.example.json"
Dictionaries are JSON — either {"pattern": "replacement"} or ordered [["pattern","replacement"], ...]; keys are regular expressions. Lines already in the target language are passed through untranslated, and identical bubbles are translated once. Reading order follows manga convention (right-to-left, panel-banded).
Measure accuracy against known translations:
C:\mtvenv\Scripts\python backend/scripts/eval_accuracy.py ollama # CER (OCR) + chrF (translation)
backend/ Python package, FastAPI, CLI, tests
web/ Next.js job UI
data/jobs/ Runtime job store (gitignored)
docs/superpowers/ Design spec + implementation plan
MIT — compose Apache/MIT model weights; do not embed GPL engines (manga-image-translator / BallonsTranslator) as libraries.