Python Apache-2.0

MangaTranslator

Manga translation app powered by AI

M

meangrinch

Dernière activité 28 sept. 2026
meangrinch/MangaTranslator

331

étoiles

57

forks

3

issues ouvertes

aiauto-translationcomicsinpaintingmangamanga-translatormanhuamanhwaocrsegmentationtext-detectiontranslation

Ce README est souvent en anglais.

English | 简体中文 | 한국어 | 日本語

MangaTranslator Logo
MangaTranslator

One-click app that translates manga, manhwa, manhua, and comics using ML models. Targets both speech bubbles and outside-bubble text, restores background art with diffusion-based inpainting, and typesets translations across 60+ languages using LLMs and custom fonts.

Original Translated (One-Click)
Original → Translated (One-Click)


Quick Setup

1. Download

  • Portable Package (Recommended): Download the portable build from Releases.
    • Windows: No requirements.
    • Linux / macOS: Requires Python 3.10+ and Git.
  • From Source:
    git clone https://github.com/meangrinch/MangaTranslator.git
    cd MangaTranslator
    python -m venv venv
    .\venv\Scripts\activate # or source venv/bin/activate (Linux/macOS)
    pip install torch==2.11.0+cu130 torchvision==0.26.0+cu130 --extra-index-url https://download.pytorch.org/whl/cu130 # or pip install torch==2.11.0 torchvision==0.26.0 (macOS)
    pip install -r requirements.txt

For additional information, see Installation.

2. Configure

  • Provider: In the Web UI, navigate to Config → Translation to select your LLM provider (e.g., Google, OpenAI, Anthropic, DeepSeek...) and enter your API key, or use a local OpenAI-compatible endpoint (e.g., llama.cpp). Save to config to persist API keys/settings across sessions.
  • Outside-Bubble Text (Optional): Navigate to Config → OSB Text and set a Hugging Face token with access to deepghs/AnimeText_yolo.
  • Environment Variables: Alternatively, you can configure credentials in your environment (e.g., GEMINI_API_KEY, HF_TOKEN) for both Web UI and CLI usage.

For additional information, see Configuration.

3. Translate

  • Web UI: Upload images to the Translator/Batch tab and click Translate.
  • CLI:
    python main.py --input "path/to/page.jpg" --input-language "Japanese" --output-language "English" --font-dir "fonts/Komika Hand" --provider Google --google-api-key <...> --osb-enable --osb-font-dir "fonts/Comicka" --osb-hf-token <...>

For additional examples, see CLI.

Tip

You can enable Cleaning-only Mode by navigating to Config → Other in the Web UI, or pass --cleaning-only in the CLI, to remove text without translating (e.g., for manual scanlation).


Features

  • Automation: One-click translation; no manual intervention required
  • Interfaces: Web UI (Gradio) and CLI
  • Processing: Single image, folder, and ZIP archive batch processing (with directory preservation)
  • Detection: Speech bubble and outside-bubble text detection (YOLO, SAM 2.1/3)
  • Cleaning: Inpaint speech bubbles and background text (FLUX.2 Klein, FLUX.1 Kontext, or OpenCV)
  • Translation: OCR and translation supporting 60+ languages (cloud API or local LLM)
  • Rendering: Custom text rendering with alignment, word wrap, and custom font packs
  • Upscaling: Text region and full-page artwork upscaling (2x-AnimeSharpV4)
  • Configuration: Flexible controls to adapt to diverse page layouts and fine-tune output quality

Documentation


Support the Project

MangaTranslator is open-source and free. If it saves you time or enhances your reading experience, consider supporting its development!

Support on Ko-fi


License & Credits

ML Models and Libraries

Projets similaires

Translate manga/image 一键翻译各类图片内文字 https://cotrans.touhou.ai/ (no longer working)

Pythonanimeauto-translationchinese-translation
Zzyddnys
10,5 k étoiles1,1 k

AI comic and manga translator app/browser extension for automatically translating comics, manga, manhwa, BDs, fumetti, and more in multiple languages and formats (Images, PDF, EPUB, CBR, CBZ etc).

Pythonanimecomicscomputer-vision
Oogkalu2
3 k étoiles342

基于manga-image-translator 实现的开源漫画AI翻译桌面工具。支持日、韩、英文漫画自动处理,集成OpenAl、Gemini等多翻译引擎;实现OCR文字检测、原文擦除、AI翻译、图像修复、译文排版完整链路,自带可视化编辑器,支持自定义文本样式,一键部署开箱即用。

Pythonautomated-translationcomic-translationgemini
Hhgmzhn
2,9 k étoiles138