MangakiApp Store

manga-translate: Translate manga and manhwa pages on your own machine.

  • Runs locally
  • Any OpenAI-compatible API
  • MIT

manga-translate is an open-source command-line tool that turns a Japanese or Korean chapter into a lettered translation. Detection, OCR and lettering run locally; only the recognized text goes to the API you choose, 25 lines at a time, and with Ollama nothing leaves your computer.

Python 3.10 or later. CUDA, Apple Silicon or CPU.

A manga page with Japanese text in the speech bubblesThe same page lettered in English by manga-translate
JapaneseEnglish
Drag to compare. The demo page is original art made for the project; only its translation step used a scripted stand-in for the API.

Install

One command to install, one to translate

You need Python 3.10 or later. The first run downloads about 0.7 GB of models; on Linux with an NVIDIA GPU, install the CUDA build of PyTorch first.

Install

pipx install git+https://github.com/jutsustudio/manga-translate.git

uv tool install with the same URL works too.

Translate a chapter

export OPENAI_API_KEY=sk-...
export OPENAI_MODEL=gpt-4.1-mini
manga-translate chapter-01.cbz

The result is out/chapter-01/chapter-01.cbz.

More examples

# into Russian
manga-translate chapter-01.cbz -l ru

# every .cbz and .zip in the folder, into Spanish
manga-translate ./series/ -l es

# a folder of Korean manhwa pages, PNG out
manga-translate ./raw-pages/ -s ko -f png

# keep names consistent with a glossary
manga-translate chapter-01.cbz -g names.txt

Options

Command-line options

OptionDefaultMeaning
sources—.cbz or .zip files, folders of pages, or a folder of chapter archives
-l, --langEnglishTarget language, as a name or a code: en, ru, es, de, fr, uk…
-s, --source-langjaLanguage of the raws: ja for manga, ko for manhwa
-o, --out./outOutput folder
-f, --formatcbzcbz for one archive per chapter, png for numbered pages
-g, --glossary—Glossary file with fixed translations
-m, --model—Chat model id; overrides OPENAI_MODEL
-c, --config—YAML file that overrides built-in settings

Translation API

Any OpenAI-compatible API

OpenAI, OpenRouter, a local Ollama or LM Studio, or your own server. Three variables choose it, read from the environment or a .env file. Larger models translate dialogue noticeably better.

VariableMeaning
OPENAI_BASE_URLEndpoint; defaults to https://api.openai.com/v1
OPENAI_API_KEYKey for that endpoint; leave it out for a local server
OPENAI_MODELModel id; required, or pass --model
# OpenRouter
OPENAI_BASE_URL=https://openrouter.ai/api/v1
OPENAI_API_KEY=sk-or-...
OPENAI_MODEL=deepseek/deepseek-chat

# Ollama on this machine: no key, no text leaves the computer
OPENAI_BASE_URL=http://localhost:11434/v1
OPENAI_MODEL=qwen2.5:14b

Glossary and output

Same names in every chapter

One source = translation per line. Text in parentheses is a note for the model, such as who speaks and how. Keep one glossary per series and pass it with -g.

コイ = Koi (girl, narrator; casual and blunt)
ハルト = Haruto (boy, Koi's older brother; polite)
ミナミ先生 = Ms. Minami (woman, homeroom teacher; formal)
ネオン区 = Neon Ward
金魚屋 = the Goldfish Shop

Each chapter gets its own folder. The two text files make it easy to check the OCR or reuse the translation.

out/chapter-01/
  chapter-01.cbz    translated pages (001.png… with -f png)
  transcript.txt    the recognized source text, page by page
  translation.txt   the translation, page by page

How it works

Six steps per chapter

  1. UnpackPages are read in natural order. A run of same-width slices is treated as a webtoon and stitched into one strip, so a bubble cut across two images is translated once.
  2. UpscalePages narrower than 1,700 px are upscaled with Real-ESRGAN, so text in low-resolution scans still reads.
  3. DetectAn RT-DETR model finds bubbles, the text inside them and text over the art, then sorts the boxes into reading order.
  4. Readmanga-ocr reads Japanese and EasyOCR reads Korean: right to left for manga, left to right for manhwa.
  5. TranslateThe chapter’s lines go to the chat API 25 at a time with the glossary in the prompt, so the model sees the conversation. Skipped lines are requested again.
  6. LetterThe original text is erased, the bubble is measured, and the translation is wrapped and sized to fit.
ModelUsed forLicense
Real-ESRGAN x4plus anime 6BUpscalingBSD-3-Clause
comic-text-and-bubble-detectorBubble and text detectionApache-2.0
manga-ocrJapanese OCRApache-2.0
EasyOCRKorean OCRApache-2.0
Models download on first use and are cached. The bundled fonts, Bangers and Neucha, are under the SIL Open Font License and cover Latin (with Vietnamese) and Cyrillic.

Read the result in Mangaki

Import the translated CBZ on iPhone or iPad, or drop it into a tanaki library.

About Mangaki

manga-translate does not provide, host or download comics. You are responsible for the content you translate and for how you share the result.

Guides

How manga-translate compares

FAQ

Questions about manga-translate

Do I need a GPU to run manga-translate?

No. It uses an NVIDIA GPU through CUDA, Apple Silicon through Metal (MPS), or the CPU. Without a GPU everything works, only slower.

Can manga-translate work without sending anything to the cloud?

Yes. Point OPENAI_BASE_URL at a local server such as Ollama (http://localhost:11434/v1) and leave out the API key. Pages never leave your machine in any setup; with a local model the text stays there too. The models download once, about 0.7 GB.

Which languages can it translate from?

Japanese (ja, the default) and Korean (ko). Japanese is read with manga-ocr and Korean with EasyOCR.

Which languages can it translate into?

Any language your chat model writes, as long as a font covers its script. The bundled fonts cover Latin, including Vietnamese, and Cyrillic; for Greek, Thai, Chinese or another script, add a font in the config.

Does manga-translate download manga?

No. It is a translation tool: it does not provide, host or download comics. It works on files you already have, and you are responsible for what you translate and how you share it.

What does manga-translate produce?

A folder per chapter in ./out with a translated CBZ (or numbered PNG pages with -f png), transcript.txt with the recognized source text and translation.txt with the translation, page by page.