AUTHOR: Meangrinch
0
stars
2
commits
Python
primary language
Jul 19, 2026
updated
Gradio-based web application for automating the translation of manga/comic page images using AI. Targets speech bubbles and text outside of speech bubbles. Supports 60 languages and custom font pack usage.
| Original | Translated (w/ a single click) |
|---|---|
![]() | ![]() |
.ttf/.otf files; included with portable packageDownload the standalone zip from the releases page: Portable Build
Requirements:
Setup:
setup.bat./setup.sh in terminal./MangaTranslator/:
start-webui.batstart-webui.shIncluded font packs:
[!TIP] In the event that you need to transfer to a fresh portable package:
- You can safely move the
fonts,models, andoutputdirectories to the new portable package- You might be able to move the
runtimedirectory over, assuming the same setup configuration is wanted
git clone https://github.com/meangrinch/MangaTranslator.git
cd MangaTranslator
python -m venv venv
# Windows PowerShell/CMD
.\venv\Scripts\activate
# Linux/macOS
source venv/bin/activate
# Example (CUDA 13.0)
pip install torch==2.11.0+cu130 torchvision==0.26.0+cu130 --extra-index-url https://download.pytorch.org/whl/cu130
# Example (ROCm 7.1)
pip install torch==2.11.0+rocm7.1 torchvision==0.26.0+rocm7.1 --extra-index-url https://download.pytorch.org/whl/rocm7.1
# Example (XPU)
pip install torch==2.11.0+xpu torchvision==0.26.0+xpu --extra-index-url https://download.pytorch.org/whl/xpu
# Example (MPS/CPU)
pip install torch==2.11.0 torchvision==0.26.0
# Example (Windows, Python 3.13, PyTorch 2.11.0, CUDA 13.0)
pip install https://github.com/nunchaku-ai/nunchaku/releases/download/v1.3.0dev20260213/nunchaku-1.3.0.dev20260213+cu13.0torch2.11-cp313-cp313-win_amd64.whl
# Example (Linux, Python 3.13, PyTorch 2.11.0, CUDA 13.0)
pip install https://github.com/nunchaku-ai/nunchaku/releases/download/v1.3.0dev20260213/nunchaku-1.3.0.dev20260213+cu13.0torch2.11-cp313-cp313-linux_x86_64.whl
[!NOTE] Nunchaku is not necessary for the use of Flux models via the sd.cpp/SDNQ backends.
pip install -r requirements.txt
fonts/ with .otf/.ttf filesitalic/bold or both so variants are detectedfonts/
├─ CC Wild Words/
│ ├─ CCWildWords-Regular.otf
│ ├─ CCWildWords-Italic.otf
│ ├─ CCWildWords-Bold.otf
│ └─ CCWildWords-BoldItalic.otf
└─ Komika/
├─ KOMIKA-HAND.ttf
└─ KOMIKA-HANDBOLD.ttf
GOOGLE_API_KEY / GEMINI_API_KEY, OPENAI_API_KEY, ANTHROPIC_API_KEY, SPACEXAI_API_KEY / XAI_API_KEY, DEEPSEEK_API_KEY, ZAI_API_KEY, MOONSHOT_API_KEY, MIMO_API_KEY, OPENROUTER_API_KEY, AGENTROUTER_API_KEY, OPENAI_COMPATIBLE_API_KEYhttp://localhost:8080/v1[!NOTE] AgentRouter (agentrouter.org) is a non-profit OpenAI-compatible AI gateway that provides unified access to 30+ LLM providers (GPT-5, Claude, DeepSeek, GLM, ...) through a single API key. $200 free credits on signup — no credit card required. Get your API key at https://agentrouter.org/console/token and paste it into the "AgentRouter API Key" field in the Config tab, or set the
AGENTROUTER_API_KEYenv var. The default model isauto(best-available routing); you can also pick a specific upstream model (e.g.claude-opus-4-8,gpt-5.5,glm-5.2) or enter any custom slug.AgentRouter enforces a server-side client whitelist (Claude Code, Codex, Cline, ...). MangaTranslator automatically sends the exact Claude Code CLI HTTP fingerprint (
User-Agent: claude-cli/...,x-app: cli,X-Stainless-*,anthropic-version,anthropic-beta, ...) on every request so the gateway accepts it. If you run MangaTranslator from a data-center IP, the upstream Aliyun WAF may occasionally challenge the request — the app detects this and shows a clear error message suggesting you retry from a residential network.
[!NOTE] The following models are automatically detected when used via the OpenAI-Compatible provider and receive optimized prompting. They are text-only and require two-step translation + local OCR. The
special_instructionsfield maps to their corresponding glossary/terminology (one entry per line, e.g.,term -> translation).
- YanoljaNEXT-Rosetta (e.g.,
yanolja/YanoljaNEXT-Rosetta-4B-2511-GGUF)- Hy-MT2 (e.g.,
tencent/Hy-MT2-7B). Also pre-fills the model's recommended sampling parameters
If you want to use the OSB text pipeline, you need a Hugging Face token with access to the following repositories:
deepghs/AnimeText_yolohf_token in ConfigHF_TOKENstart-webui.bat inside the MangaTranslator folder./start-webui.sh inside the MangaTranslator folderpython app.py --open-browserOptions: --models (default ./models), --fonts (default ./fonts), --port (default 7676), --cpu.
First launch can take ~1–2 minutes.
Once launched, configure your LLM provider in the Config tab, then upload images and click Translate.
Examples:
# Single image, Japanese → English, Google provider
python main.py --input <image_path> \
--font-dir "fonts/Komika" --provider Google --google-api-key <AI...>
# Batch folder, custom source/target languages, OpenAI-Compatible provider (llama.cpp)
python main.py --input <folder_path> --batch \
--font-dir "fonts/Komika" \
--input-language <src_lang> --output-language <tgt_lang> \
--provider OpenAI-Compatible --openai-compatible-url http://localhost:8080/v1 \
--output ./output
# Single Image, Japanese → English (Google), OSB text pipeline, custom OSB text font
python main.py --input <image_path> \
--font-dir "fonts/Komika" --provider Google --google-api-key <AI...> \
--osb-enable --osb-font-dir "fonts/Clementine"
# Cleaning-only mode (no translation/text rendering)
python main.py --input <image_path> --cleaning-only
# Upscaling-only mode (no detection/translation, only upscale)
python main.py --input <image_path> --upscaling-only --image-upscale-mode final --image-upscale-factor 2.0
# Test mode (no translation; render placeholder text)
python main.py --input <image_path> --test-mode
# Full options
python main.py --help
update.bat from the portable package root./update.sh from the portable package rootFrom the repo root:
git pull
pip install -r requirements.txt # Or activate venv first if present
Python
99.5%
AUTHOR: Meangrinch
0
stars
2
commits
Python
primary language
Jul 19, 2026
updated
Gradio-based web application for automating the translation of manga/comic page images using AI. Targets speech bubbles and text outside of speech bubbles. Supports 60 languages and custom font pack usage.
| Original | Translated (w/ a single click) |
|---|---|
![]() | ![]() |
.ttf/.otf files; included with portable packageDownload the standalone zip from the releases page: Portable Build
Requirements:
Setup:
setup.bat./setup.sh in terminal./MangaTranslator/:
start-webui.batstart-webui.shIncluded font packs:
[!TIP] In the event that you need to transfer to a fresh portable package:
- You can safely move the
fonts,models, andoutputdirectories to the new portable package- You might be able to move the
runtimedirectory over, assuming the same setup configuration is wanted
git clone https://github.com/meangrinch/MangaTranslator.git
cd MangaTranslator
python -m venv venv
# Windows PowerShell/CMD
.\venv\Scripts\activate
# Linux/macOS
source venv/bin/activate
# Example (CUDA 13.0)
pip install torch==2.11.0+cu130 torchvision==0.26.0+cu130 --extra-index-url https://download.pytorch.org/whl/cu130
# Example (ROCm 7.1)
pip install torch==2.11.0+rocm7.1 torchvision==0.26.0+rocm7.1 --extra-index-url https://download.pytorch.org/whl/rocm7.1
# Example (XPU)
pip install torch==2.11.0+xpu torchvision==0.26.0+xpu --extra-index-url https://download.pytorch.org/whl/xpu
# Example (MPS/CPU)
pip install torch==2.11.0 torchvision==0.26.0
# Example (Windows, Python 3.13, PyTorch 2.11.0, CUDA 13.0)
pip install https://github.com/nunchaku-ai/nunchaku/releases/download/v1.3.0dev20260213/nunchaku-1.3.0.dev20260213+cu13.0torch2.11-cp313-cp313-win_amd64.whl
# Example (Linux, Python 3.13, PyTorch 2.11.0, CUDA 13.0)
pip install https://github.com/nunchaku-ai/nunchaku/releases/download/v1.3.0dev20260213/nunchaku-1.3.0.dev20260213+cu13.0torch2.11-cp313-cp313-linux_x86_64.whl
[!NOTE] Nunchaku is not necessary for the use of Flux models via the sd.cpp/SDNQ backends.
pip install -r requirements.txt
fonts/ with .otf/.ttf filesitalic/bold or both so variants are detectedfonts/
├─ CC Wild Words/
│ ├─ CCWildWords-Regular.otf
│ ├─ CCWildWords-Italic.otf
│ ├─ CCWildWords-Bold.otf
│ └─ CCWildWords-BoldItalic.otf
└─ Komika/
├─ KOMIKA-HAND.ttf
└─ KOMIKA-HANDBOLD.ttf
GOOGLE_API_KEY / GEMINI_API_KEY, OPENAI_API_KEY, ANTHROPIC_API_KEY, SPACEXAI_API_KEY / XAI_API_KEY, DEEPSEEK_API_KEY, ZAI_API_KEY, MOONSHOT_API_KEY, MIMO_API_KEY, OPENROUTER_API_KEY, AGENTROUTER_API_KEY, OPENAI_COMPATIBLE_API_KEYhttp://localhost:8080/v1[!NOTE] AgentRouter (agentrouter.org) is a non-profit OpenAI-compatible AI gateway that provides unified access to 30+ LLM providers (GPT-5, Claude, DeepSeek, GLM, ...) through a single API key. $200 free credits on signup — no credit card required. Get your API key at https://agentrouter.org/console/token and paste it into the "AgentRouter API Key" field in the Config tab, or set the
AGENTROUTER_API_KEYenv var. The default model isauto(best-available routing); you can also pick a specific upstream model (e.g.claude-opus-4-8,gpt-5.5,glm-5.2) or enter any custom slug.AgentRouter enforces a server-side client whitelist (Claude Code, Codex, Cline, ...). MangaTranslator automatically sends the exact Claude Code CLI HTTP fingerprint (
User-Agent: claude-cli/...,x-app: cli,X-Stainless-*,anthropic-version,anthropic-beta, ...) on every request so the gateway accepts it. If you run MangaTranslator from a data-center IP, the upstream Aliyun WAF may occasionally challenge the request — the app detects this and shows a clear error message suggesting you retry from a residential network.
[!NOTE] The following models are automatically detected when used via the OpenAI-Compatible provider and receive optimized prompting. They are text-only and require two-step translation + local OCR. The
special_instructionsfield maps to their corresponding glossary/terminology (one entry per line, e.g.,term -> translation).
- YanoljaNEXT-Rosetta (e.g.,
yanolja/YanoljaNEXT-Rosetta-4B-2511-GGUF)- Hy-MT2 (e.g.,
tencent/Hy-MT2-7B). Also pre-fills the model's recommended sampling parameters
If you want to use the OSB text pipeline, you need a Hugging Face token with access to the following repositories:
deepghs/AnimeText_yolohf_token in ConfigHF_TOKENstart-webui.bat inside the MangaTranslator folder./start-webui.sh inside the MangaTranslator folderpython app.py --open-browserOptions: --models (default ./models), --fonts (default ./fonts), --port (default 7676), --cpu.
First launch can take ~1–2 minutes.
Once launched, configure your LLM provider in the Config tab, then upload images and click Translate.
Examples:
# Single image, Japanese → English, Google provider
python main.py --input <image_path> \
--font-dir "fonts/Komika" --provider Google --google-api-key <AI...>
# Batch folder, custom source/target languages, OpenAI-Compatible provider (llama.cpp)
python main.py --input <folder_path> --batch \
--font-dir "fonts/Komika" \
--input-language <src_lang> --output-language <tgt_lang> \
--provider OpenAI-Compatible --openai-compatible-url http://localhost:8080/v1 \
--output ./output
# Single Image, Japanese → English (Google), OSB text pipeline, custom OSB text font
python main.py --input <image_path> \
--font-dir "fonts/Komika" --provider Google --google-api-key <AI...> \
--osb-enable --osb-font-dir "fonts/Clementine"
# Cleaning-only mode (no translation/text rendering)
python main.py --input <image_path> --cleaning-only
# Upscaling-only mode (no detection/translation, only upscale)
python main.py --input <image_path> --upscaling-only --image-upscale-mode final --image-upscale-factor 2.0
# Test mode (no translation; render placeholder text)
python main.py --input <image_path> --test-mode
# Full options
python main.py --help
update.bat from the portable package root./update.sh from the portable package rootFrom the repo root:
git pull
pip install -r requirements.txt # Or activate venv first if present
Python
99.5%