{"id":35800660,"url":"https://github.com/meangrinch/mangatranslator","last_synced_at":"2026-05-31T08:00:40.905Z","repository":{"id":287800191,"uuid":"962328949","full_name":"meangrinch/MangaTranslator","owner":"meangrinch","description":"Manga translation app powered by AI","archived":false,"fork":false,"pushed_at":"2026-05-14T01:35:32.000Z","size":2790,"stargazers_count":208,"open_issues_count":3,"forks_count":36,"subscribers_count":4,"default_branch":"main","last_synced_at":"2026-05-14T03:28:58.499Z","etag":null,"topics":["ai","auto-translation","comics","inpainting","manga","manga-translator","manhua","manhwa","ocr","segmentation","text-detection","translation"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/meangrinch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-04-08T02:00:30.000Z","updated_at":"2026-05-14T01:31:24.000Z","dependencies_parsed_at":"2025-12-18T08:04:32.300Z","dependency_job_id":null,"html_url":"https://github.com/meangrinch/MangaTranslator","commit_stats":null,"previous_names":["meangrinch/mangatranslator"],"tags_count":81,"template":false,"template_full_name":null,"purl":"pkg:github/meangrinch/MangaTranslator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meangrinch%2FMangaTranslator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meangrinch%2FMangaTranslator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meangrinch%2FMangaTranslator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meangrinch%2FMangaTranslator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/meangrinch","download_url":"https://codeload.github.com/meangrinch/MangaTranslator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meangrinch%2FMangaTranslator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33723549,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-31T02:00:06.040Z","response_time":95,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","auto-translation","comics","inpainting","manga","manga-translator","manhua","manhwa","ocr","segmentation","text-detection","translation"],"created_at":"2026-01-07T11:05:27.883Z","updated_at":"2026-05-31T08:00:40.894Z","avatar_url":"https://github.com/meangrinch.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[English](README.md) | [简体中文](docs/translations/README_zh.md) | [한국어](docs/translations/README_ko.md) | [日本語](docs/translations/README_ja.md)\n\n## MangaTranslator\n\nGradio-based web application for automating the translation of manga/comic page images using AI. Targets speech bubbles and text outside of speech bubbles. Supports 59 languages and custom font pack usage.\n\n\u003cdiv align=\"left\"\u003e\n  \u003ctable\u003e\n    \u003ctr\u003e\n      \u003cth style=\"text-align: left\"\u003eOriginal\u003c/th\u003e\n      \u003cth style=\"text-align: left\"\u003eTranslated (w/ a single click)\u003c/th\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cimg src=\"docs/images/example_original.jpg\" width=\"400\" /\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003cimg src=\"docs/images/example_translation.jpg\" width=\"400\" /\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/table\u003e\n\u003c/div\u003e\n\n## Table of Contents\n\n- [Features](#features)\n- [Requirements](#requirements)\n- [Install](#install)\n- [Post-Install Setup](#post-install-setup)\n- [Run](#run)\n- [Documentation](#documentation)\n- [Updating](#updating)\n- [License \u0026 Credits](#license--credits)\n\n## Features\n\n- **Detection**: Speech bubble detection \u0026 segmentation (YOLO + SAM 2.1/3)\n- **Cleaning**: Inpaint speech bubbles and OSB text (Flux.2 Klein, Flux.1 Kontext, or OpenCV)\n- **Translation**: LLM-powered OCR \u0026 translation (59 languages)\n- **Rendering**: Text rendering with alignment and custom font packs\n- **Upscaling**: 2x-AnimeSharpV4 for enhanced output quality\n- **Processing**: Single/batch processing with directory preservation and ZIP support\n- **Interfaces**: Web UI (Gradio) and CLI\n- **Automation**: One-click translation; no intervention required\n\n## Requirements\n\n- Python 3.10+\n- PyTorch (CPU, CUDA, ROCm, XPU, MPS)\n- Font pack with `.ttf`/`.otf` files; included with portable package\n- LLM for Japanese source text; VLM for other languages (API or local)\n\n## Install\n\n### Portable Package (Recommended)\n\nDownload the standalone zip from the releases page: [Portable Build](https://github.com/meangrinch/MangaTranslator/releases/tag/portable)\n\n**Requirements:**\n\n- **Windows:** Bundled Python/Git included; no additional requirements\n- **Linux/macOS:** Python 3.10+ and Git must be installed on your system\n\n**Setup:**\n\n1. Extract the zip file\n2. Run the setup script for your platform:\n   - **Windows:** Double-click `setup.bat`\n   - **Linux/macOS:** Run `./setup.sh` in terminal\n3. PyTorch version is automatically detected and installed based on your system\n4. Open the launcher script created in `./MangaTranslator/`:\n   - **Windows:** `start-webui.bat`\n   - **Linux/macOS:** `start-webui.sh`\n\nIncluded font packs:\n\n- _Komika_ (normal text)\n- _Cookies_ (OSB text)\n- _Comicka_ (either)\n- _Roboto_ (supports accents)\n- _Noto Sans SC_ (supports Simplified Chinese)\n\n\u003e [!TIP]\n\u003e In the event that you need to transfer to a fresh portable package:\n\u003e\n\u003e - You can safely move the `fonts`, `models`, and `output` directories to the new portable package\n\u003e - You might be able to move the `runtime` directory over, assuming the same setup configuration is wanted\n\n### Manual install\n\n1. Clone and enter the repo\n\n```bash\ngit clone https://github.com/meangrinch/MangaTranslator.git\ncd MangaTranslator\n```\n\n2. Create and activate a virtual environment (recommended)\n\n```bash\npython -m venv venv\n# Windows PowerShell/CMD\n.\\venv\\Scripts\\activate\n# Linux/macOS\nsource venv/bin/activate\n```\n\n3. Install PyTorch (see: [PyTorch Install](https://pytorch.org/get-started/locally/))\n\n```bash\n# Example (CUDA 13.0)\npip install torch==2.10.0+cu130 torchvision==0.25.0+cu130 --extra-index-url https://download.pytorch.org/whl/cu130\n# Example (ROCm 7.1)\npip install torch==2.10.0+rocm7.1 torchvision==0.25.0+rocm7.1 --extra-index-url https://download.pytorch.org/whl/rocm7.1\n# Example (XPU)\npip install torch==2.10.0+xpu torchvision==0.25.0+xpu --extra-index-url https://download.pytorch.org/whl/xpu\n# Example (MPS/CPU)\npip install torch==2.10.0 torchvision==0.25.0\n```\n\n4. Install Nunchaku (optional, for Flux.1 Kontext Nunchaku backend)\n\n- Nunchaku wheels are not on PyPI. Install directly from the v1.2.1 GitHub release URL, matching your OS and Python version. CUDA only, and requires a 2000-series card or newer.\n\n```bash\n# Example (Windows, Python 3.13, PyTorch 2.10.0, CUDA 13.0)\npip install https://github.com/nunchaku-ai/nunchaku/releases/download/v1.2.1/nunchaku-1.2.1+cu13.0torch2.10-cp313-cp313-win_amd64.whl\n```\n\n\u003e [!NOTE]\n\u003e Nunchaku is not necessary for the use of Flux models via the SDNQ backend.\n\n5. Install dependencies\n\n```bash\npip install -r requirements.txt\n```\n\n## Post-Install Setup\n\n### Models\n\n- The application will automatically download and use all required models\n\n### Fonts\n\n- Put font packs as subfolders in `fonts/` with `.otf`/`.ttf` files\n- Prefer filenames that include `italic`/`bold` or both so variants are detected\n- Example structure:\n\n```text\nfonts/\n├─ CC Wild Words/\n│  ├─ CCWildWords-Regular.otf\n│  ├─ CCWildWords-Italic.otf\n│  ├─ CCWildWords-Bold.otf\n│  └─ CCWildWords-BoldItalic.otf\n└─ Komika/\n   ├─ KOMIKA-HAND.ttf\n   └─ KOMIKA-HANDBOLD.ttf\n```\n\n### LLM setup\n\n- Providers: Google, OpenAI, Anthropic, xAI, DeepSeek, Z.ai, Moonshot AI, Xiaomi MiMo, OpenRouter, OpenAI-Compatible\n- Web UI: configure provider/model/key in the Config tab (stored locally)\n- CLI: pass keys/URLs as flags or via env vars\n- Env vars: `GOOGLE_API_KEY`, `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, `XAI_API_KEY`, `DEEPSEEK_API_KEY`, `ZAI_API_KEY`, `MOONSHOT_API_KEY`, `MIMO_API_KEY`, `OPENROUTER_API_KEY`, `OPENAI_COMPATIBLE_API_KEY`\n- OpenAI-compatible default URL: `http://localhost:8080/v1`\n\n\u003e [!NOTE]\n\u003e YanoljaNEXT-Rosetta models (e.g., `yanolja/YanoljaNEXT-Rosetta-4B-2511-GGUF`) are automatically detected when used via the OpenAI-Compatible provider and receive optimized prompting. These are text-only models and require two-step + local OCR model. The Special Instructions field is mapped to Rosetta's translation glossary (one entry per line, e.g., `Yanolja NEXT -\u003e 야놀자넥스트`).\n\n### OSB text setup (optional)\n\nIf you want to use the OSB text pipeline, you need a Hugging Face token with access to the following repositories:\n\n- `deepghs/AnimeText_yolo`\n\n#### Steps to create a token:\n\n1. Sign in or create a Hugging Face account\n2. Visit and accept the terms on:\n   - [AnimeText_yolo](https://huggingface.co/deepghs/AnimeText_yolo)\n   - [FLUX.1 Kontext (dev)](https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev) (optional, if using Kontext with Nunchaku)\n   - [SAM 3](https://huggingface.co/facebook/sam3) (optional, if using SAM 3)\n3. Create a new access token in your Hugging Face settings with read access to gated repos (\"Read access to contents of public gated repos\")\n4. Add the token to the app:\n   - Web UI: set `hf_token` in Config\n   - Env var (alternative): set `HUGGINGFACE_TOKEN`\n5. Save config to preserve the token across sessions\n\n## Run\n\n### Web UI (Gradio)\n\n- **Portable package:**\n  - Windows: Double-click `start-webui.bat` inside the `MangaTranslator` folder\n  - Linux/macOS: Run `./start-webui.sh` inside the `MangaTranslator` folder\n- **Manual install:**\n  - Windows: Run `python app.py --open-browser`\n\nOptions: `--models` (default `./models`), `--fonts` (default `./fonts`), `--port` (default `7676`), `--cpu`.\nFirst launch can take ~1–2 minutes.\n\nOnce launched, configure your LLM provider in the Config tab, then upload images and click Translate.\n\n### CLI\n\nExamples:\n\n```bash\n# Single image, Japanese → English, Google provider\npython main.py --input \u003cimage_path\u003e \\\n  --font-dir \"fonts/Komika\" --provider Google --google-api-key \u003cAI...\u003e\n\n# Batch folder, custom source/target languages, OpenAI-Compatible provider (llama.cpp)\npython main.py --input \u003cfolder_path\u003e --batch \\\n  --font-dir \"fonts/Komika\" \\\n  --input-language \u003csrc_lang\u003e --output-language \u003ctgt_lang\u003e \\\n  --provider OpenAI-Compatible --openai-compatible-url http://localhost:8080/v1 \\\n  --output ./output\n\n# Single Image, Japanese → English (Google), OSB text pipeline, custom OSB text font\npython main.py --input \u003cimage_path\u003e \\\n  --font-dir \"fonts/Komika\" --provider Google --google-api-key \u003cAI...\u003e \\\n  --osb-enable --osb-font-dir \"fonts/Clementine\"\n\n# Cleaning-only mode (no translation/text rendering)\npython main.py --input \u003cimage_path\u003e --cleaning-only\n\n# Upscaling-only mode (no detection/translation, only upscale)\npython main.py --input \u003cimage_path\u003e --upscaling-only --image-upscale-mode final --image-upscale-factor 2.0\n\n# Test mode (no translation; render placeholder text)\npython main.py --input \u003cimage_path\u003e --test-mode\n\n# Full options\npython main.py --help\n```\n\n## Documentation\n\n- [Hardware Requirements](docs/HARDWARE_REQUIREMENTS.md)\n- [Recommended Fonts](docs/FONTS.md)\n- [Troubleshooting](docs/TROUBLESHOOTING.md)\n\n## Updating\n\n### Portable Package\n\n- Windows: Run `update.bat` from the portable package root\n- Linux/macOS: Run `./update.sh` from the portable package root\n\n### Manual Install\n\nFrom the repo root:\n\n```bash\ngit pull\npip install -r requirements.txt  # Or activate venv first if present\n```\n\n## License \u0026 credits\n\n- License: Apache-2.0 (see [LICENSE](LICENSE))\n- Author: [grinnch](https://github.com/meangrinch)\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eML Models \u0026 Libraries\u003c/b\u003e\u003c/summary\u003e\n\n- YOLOv8m Speech Bubble Detector: [kitsumed](https://huggingface.co/kitsumed/yolov8m_seg-speech-bubble)\n- Manga109 Speech Bubble Detector: [huyvux3005](https://huggingface.co/huyvux3005/manga109-segmentation-bubble)\n- Comic Speech Bubble Detector YOLOv8m: [ogkalu](https://huggingface.co/ogkalu/comic-speech-bubble-detector-yolov8m)\n- Manga109 YOLO: [deepghs](https://huggingface.co/deepghs/manga109_yolo)\n- AnimeText YOLO: [deepghs](https://huggingface.co/deepghs/AnimeText_yolo)\n- SAM 2.1: Segment Anything in Images and Videos: [Meta AI](https://huggingface.co/facebook/sam2.1-hiera-large)\n- SAM 3: [Meta AI](https://huggingface.co/facebook/sam3)\n- FLUX.1 Kontext: [Black Forest Labs](https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev)\n- FLUX.2 Klein 4B: [Black Forest Labs](https://huggingface.co/black-forest-labs/FLUX.2-klein-4B)\n- FLUX.2 Klein 9B: [Black Forest Labs](https://huggingface.co/black-forest-labs/FLUX.2-klein-9B)\n- Nunchaku: [Nunchaku AI](https://github.com/nunchaku-ai/nunchaku)\n- SDNQ Quants: [Disty0](https://huggingface.co/Disty0)\n- 2x-AnimeSharpV4: [Kim2091](https://huggingface.co/Kim2091/2x-AnimeSharpV4)\n- Manga OCR: [kha-white](https://github.com/kha-white/manga-ocr)\n- PaddleOCR-VL-1.5: [PaddlePaddle](https://github.com/PaddlePaddle/PaddleOCR-VL-1.5)\n\n\u003c/details\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeangrinch%2Fmangatranslator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeangrinch%2Fmangatranslator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeangrinch%2Fmangatranslator/lists"}