AnimeText OCR Studio
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
AnimeText OCR Studio
Detect the text blocks in an anime/manga page and read them — in one app, with three doors: a PySide6 window a human can watch, a headless CLI that prints one JSON document, and an MCP server an agent can drive. Every door moves the same state; nothing forks.
Repository: https://github.com/paoloinverse/animetext-yolo-MCP — code, tests, docs and
the build trail. A clone carries no model weights and no scans (decision D95): run
python scripts/fetch_models.py to build the bundle, then animetext-studio --doctor to ask
whether the machine can run it.
page.png ──► AnimeText YOLO (deepghs/AnimeText_yolo) ──► boxes ──► Hayai Supernova crop OCR
5 variants, n · s · m · l · x JustANormalTinkerer/hayai-ocr-v2.7-supernova
└─► box → text JSON (schema 1.2)Door | What you get |
GUI | Boxes on the page, a block table, the JSON, live controls — and a dock showing every remote call an agent makes |
CLI |
|
MCP | 21 tools + 6 resources over streamable-HTTP or stdio; 14 error codes, never a broken socket |
Two properties hold everywhere:
It runs offline. Both models are vendored under
animetext_studio/models/(≈1.3 GB) with a sha256 manifest and pinned revisions.--offlineis a promise the app keeps, not a wish.It is deterministic. Same page + same config → same boxes, same order, same text. Only
created_atandtiming_mschange between runs.
Contents
Install · Models & offline bundle · Hugging Face token setup · Quick start · GUI guide · CLI reference · MCP reference · Configuration reference · Result document · Performance notes · Troubleshooting · Development · Licensing
Related MCP server: PaddleOCR-json MCP
Install
Python 3.10 – 3.13. (3.14 works for the app but not for dghs-imgutils, which still uses
the ast.Str/ast.Num aliases removed in 3.14 — see Troubleshooting.)
git clone <this repo> && cd animetext-studio
pip install -e ".[gui,detect,ocr,mcp]" # or ".[all]"Extra | Pulls in | Needed for |
(core) |
| headless result documents, config tools, |
|
| the window |
|
| stage 1 (YOLO) |
|
| stage 2 (Hayai) |
|
| the MCP server |
|
| the test suite |
Everything is optional by design: pip install -e . on a machine with neither PySide6 nor
torch still gives you a working CLI that reports the bundle and explains, with a structured
error and the right exit code, what it cannot do yet.
CUDA (OCR on the GPU)
pip install .[ocr] gives you CPU torch. For an NVIDIA card install a CUDA build first,
from the index that matches the card — the app never asks for a specific one, it just uses
whatever torch reports:
# NVIDIA Blackwell (RTX 50xx, sm_120) needs torch >= 2.7 with CUDA >= 12.8 wheels:
pip install torch --index-url https://download.pytorch.org/whl/cu128
pip install -e ".[gui,detect,ocr,mcp]"
animetext-studio --device cuda:1 --model-status # the report says what is actually thereocr.device: "auto" (the default) picks cuda:0 when torch sees a usable device and cpu
when it does not — and says so in get_status / the document, so a device that lies is
impossible. Asking for cuda:7 when there are two cards is an ENGINE_LOAD_FAILED with the
visible-device count, not a silent fall-back.
The dghs-imgutils wrinkle
dghs-imgutils pins numpy<2, which has no wheels for Python 3.13 and would downgrade numpy
underneath torch. On a numpy-2 install, put it in without its dependency set:
pip install --no-deps dghs-imgutils
pip install hfutils hbutils onnxruntime opencv-contrib-python pyrfc6266 piexif \
pyclipper shapely emoji pilmojiThat is the verified working set (the list is what imgutils.generic.yolo actually imports).
scripts/setup_dev.sh --detect --gui does it for you and handles both a rich interpreter and
a bare --venv.
Models & offline bundle
The weights are part of the deliverable (decision D26): a copy of this folder — or a built wheel — is a complete offline installation. No download at first run, no cache warm-up, no token for the OCR model.
A clone is not a copy (decision D95, amending D26). The AnimeText weights are their
author's to distribute, the Hayai snapshot is 604 MB on its own, and four files under
models/ pass GitHub's 100 MB hard limit — so the repository publishes no models/ at
all, and no sample_scans/ either. One command builds the bundle described below, and it is
the same command that repairs a damaged one:
python scripts/fetch_models.py --all --ocr # a HF token is needed for the gated detection repoEverything on this page describes a folder that has been built — by copy or by fetch — and the
app does not care which: a folder with no bundle still starts, still answers --model-status,
fails with MODEL_NOT_FOUND naming that command, and runs --mock regardless.
animetext_studio/models/
├── MANIFEST.json provenance: repo, revision, size, sha256 (33 files)
├── animetext-yolo/<variant>/ model.onnx + threshold.json + labels.json + model_type.json
│ (l and x also carry the upstream model.pt)
└── hayai-ocr-v2.7-supernova/ model.safetensors + processor/tokenizer files + remote code
.origin.json records the pinned revisionVariant | Params | F1 | Recommended score threshold |
|
| 2.57 M | 0.86 | 0.251 | 10 MB |
| 9.25 M | 0.88 | 0.272 | 36 MB |
| 20.1 M | 0.89 | 0.299 | 77 MB |
| 26.4 M | 0.89 | 0.426 | 101 MB |
| 59.1 M | 0.90 | 0.425 | 226 MB |
Hayai Supernova is a ~157 M-parameter crop OCR (SigLIP2 NaFlex encoder + 12-layer GQA decoder) for Japanese, Chinese, Korean and English. It reads crops, not pages — which is exactly what stage 1 produces.
Check the bundle (pure stdlib, no extras, no network, no token):
animetext-studio --model-status # JSON report: variants, sizes, revision, sha256
python scripts/fetch_models.py --verify # human-readable, exits 1 if incomplete
animetext-studio --doctor # the whole machine: deps, pins, bundle, token, font--model-status answers what is on disk; --doctor answers whether this machine can run it,
and it is the one command to run before filing a bug — it names the two dghs-imgutils behaviours
that make a healthy-looking install fail (docs/UPSTREAM.md). It is read-only
and offline by construction: it never installs, never downloads, never writes, and it never
imports imgutils — that import is the thing it is checking.
Re-vendor or extend it — never re-downloads what is already present and hash-matching:
python scripts/fetch_models.py --all --ocr # all five variants + Hayai
python scripts/fetch_models.py --variants yolo12n_animetext --with-sha256
python scripts/fetch_models.py --dry-run --all # the plan, no bytes movedMove it. --models-dir PATH, paths.models_dir in the config, or $ANIMETEXT_MODELS_DIR
(precedence: explicit → env → <package>/models). Useful when 1.3 GB should not live inside
site-packages: keep the weights on a shared volume and point every install at it.
Hugging Face token setup
You do not need a token to run this project as shipped. The detection weights are already
on disk. You need one only to (re)download from deepghs/AnimeText_yolo, which is a gated
repository.
Open https://huggingface.co/deepghs/AnimeText_yolo while logged in and accept the terms (the OCR snapshot,
JustANormalTinkerer/hayai-ocr-v2.7-supernova, is public — no step).Create a read token at https://huggingface.co/settings/tokens.
Give it to the app, in this discovery order (first hit wins):
animetext-studio --hf-token hf_… # 1. explicit flag (never written anywhere)
export HF_TOKEN=hf_… # 2. environment ($HF_TOKEN, or hf.token_env)
printf 'hf_…' > HF_token.txt # 3. a file: cwd, project root, or models root
export ANIMETEXT_TOKEN_FILE=/secrets/hf # 4. an explicit file elsewhereWhat the app does with it: sends it to huggingface_hub for the gated repo. What it does
not do: write it into a config file, print it, log it, or put it in log://mcp. Deleting
HF_token.txt removes the capability completely — there is no second place it is stored.
Two things to know:
export_configwrites the live config, which includesmcp.auth_token(the MCP token, not the HF one). Add--redact-secrets/redact_secrets: truewhen the file is going to a bug report.python scripts/check_hf_access.pyanswers "will this token work?" in one second, with actionable messages and the app's own exit codes, before you wait on a 100 MB download.
Quick start
# 1. The window (MCP server is on by default, loopback, no token)
animetext-studio --image examples/sample_page.png --preload
# 2. One page, one document, no display
animetext-studio --headless --image examples/sample_page.png --run > result.json
# 3. Everything offline, nothing downloaded, no network at all
animetext-studio --offline --headless --image page.png --run --out result.json
# 4. No weights, no torch: the deterministic fake engines (development, demos, CI)
animetext-studio --mock --image examples/sample_page.png
# 5. A headless MCP server an agent can drive
animetext-studio --headless --serve --preload --mcp-port 8765--mock is not a toy: it runs the whole product — the same pipeline, the same document, the
same 21 tools — with engines that return fixed boxes and text. It is how the suite stays
offline and how you can wire an agent before the model finishes loading.
GUI guide
┌────────────────────────────────────────────────────────────────────────────────┐
│ [MOCK/REAL ENGINES] [OFFLINE] [MCP: 127.0.0.1:8765/mcp] [engines: …] [models: …]│
│ Browse… Generate Cancel │ Export config… Import config… │
├──────────────┬─────────────────────────────────────────────────────────────────┤
│ Detection │ Input ┌─────────────────────────────────┐ │
│ model ▾ │ preview · Browse… │ canvas [Fit][100%][Save PNG…] │ │
│ IoU ──●── ├───────────────────────────│ (boxes, labels, hover panel) │ │
│ Score ──●── │ Output ├─────────────────────────────────┤ │
│ [Recommended]│ 12 block(s) · yolo12m… │ # │ score │ text / error │ flags │ │
│ OCR │ ├─────────────────────────────────┤ │
│ device ▾ │ │ JSON [Copy all][Copy block]… │ │
│ max patches ▾│ └─────────────────────────────────┘ │
│ batch/tokens│ ─────────────────────────────────────────────────────────────── │
│ Layout/View │ MCP activity time │ tool │ outcome │ ms │ detail │
│ Run/Config │ ─────────────────────────────────────────────────────────────── │
├──────────────┴─────────────────────────────────────────────────────────────────┤
│ status text stage ▸ 62% ▓▓▓▓▓░░░░░ │
└────────────────────────────────────────────────────────────────────────────────┘Getting a page in: Browse…, drag and drop onto the window, or Ctrl+V a screenshot. Getting it read: Generate (it is the default button, so Enter works). Getting one box read again: right-click its row → Re-read this block. It crops the box you already have and runs OCR on it — the detector is not asked twice — and Refresh models asks the repo for its variant list again without waiting for a restart.
Controls. Detection: variant, IoU, and score threshold — Recommended applies that
variant's F1-optimal score from the repo's threshold.json. OCR: device, patch budget,
batch size, max_new_tokens, crop padding, NFKC normalisation. Layout: reading order
(manga_rtl rows top→bottom, boxes right→left · top_to_bottom · score). View: overlay,
labels, fill opacity, fit/percent zoom. Everything you touch is the live config an MCP client
sees, and vice versa.
On the canvas. Click a box to select it; hover for a panel with the full text; Ctrl+wheel
to zoom; Save annotated PNG… bakes the boxes at full resolution. Label chips are
automatically de-collided — smallest box first, and if there is truly no room the chip keeps
#7 and drops the words, or is dropped and reported, never silently overlapping.
Flags. The table has a flags column and the summary line says · 2 flagged when it
matters:
Mark | Meaning | What to do |
|
| raise |
|
| read the parent first; nested boxes are reported, never merged or dropped |
Both are observations: they change nothing about the run, and both are in the JSON
(blocks[].flags, blocks[].contained_in).
Badges. MOCK ENGINES / REAL ENGINES, OFFLINE, MCP: <url> (or MCP: failed — a
server that cannot bind never takes the window down), engines: det yolo12m · ocr hayai
so a warmed studio is distinguishable from an empty one at a glance, and models: presets — <why>
while the variant list is the one this app ships rather than the one the repo served. That last
one appears the moment the repo stops answering and disappears when it does; it is the same
boolean an MCP client reads as engines[].model_list_is_fallback, so the window and the wire
cannot disagree about where the five model names came from.
The MCP activity dock is the point of the whole design: every remote call is a row — time, tool, redacted arguments, outcome, duration — and the widget it touched flashes. When an agent is driving your screen, you can read over its shoulder.
CLI reference
animetext-studio [flags] # default action: the GUIFlag | Default | Meaning |
| — | this table, in the terminal, exit 0 |
| — |
|
| — | load a config document (CLI flags still win) |
| — | page to load at startup |
|
| detection variant |
|
| NMS IoU threshold |
|
| confidence threshold |
|
|
|
| off | deterministic fake engines |
| off | load the weights and run one throwaway inference, so the first real page is not 2–3× slower |
| off | no warm-up anywhere in this run — the cold baseline, named (mutually exclusive with |
| — | benchmark: cold load + one first inference per device ( |
| off | no GUI |
| — | with |
| — | with |
| off | headless MCP server and stay up (implied by |
|
| transport |
|
| bind ( |
| none | require |
| — | write/print the machine-readable tool catalog and exit |
| — | HF token for the gated repo (never stored) |
| HF default | hub cache location |
|
| on-premises bundle |
| off | never use the network; bundled/cached weights only |
| — | print the bundle report as JSON and exit |
| — | read-only environment report — the Python floor, the imgutils import-time install, the numpy pin, torch/CUDA, the bundle, the token, a CJK font — and exit; never installs, never downloads, never writes ( |
| — | print the built-in defaults and exit |
| — | validate a document, print |
| — | write the resolved config (defaults + file + CLI) |
| off | with |
| — | build the window, print one line, exit 0 (headless CI) |
| off | config warnings + the resolved config, always on stderr |
stdout is a document, stderr is prose. Anything you plan to pipe is on stdout and parses as JSON; diagnostics never pollute it.
Exit codes — the same taxonomy the MCP returns as {code, message, details}, so a shell
script and an agent are reading one language (pinned against EXIT_CODES by
tests/test_p8_packaging.py):
Code | Exit | Meaning |
— |
| success |
|
| the app broke its own contract; please report it |
|
| the request itself: bad type, two sources where one is expected, out-of-range number |
|
| a config document or patch; |
|
| no page loaded (or no result published yet); |
|
| single-flight: another job owns the machine; |
|
| you cancelled it; the previous page and result are untouched |
|
| Hugging Face refused the gated repo; |
|
| the network answered badly, or |
|
| missing extra, broken weights, no provider; |
|
| OCR failed on the page, or on one crop ( |
|
| a file could not be read or written |
|
| not a readable image, or too large to decode (a truncated download looks like this) |
|
| not on premises and cannot be fetched; |
|
| reserved for forward compatibility; no code path produces it |
— |
| an unexpected |
The demo modules are the same engines without the app, useful for bisecting a problem:
python -m animetext_studio.tools.detect_demo page.png,
python -m animetext_studio.tools.ocr_demo page.png --bbox 812,96,918,402,
python -m animetext_studio.tools.mcp_client_demo --url http://127.0.0.1:8765/mcp.
MCP reference
Full specification — every tool's schema, per-call GUI effect, progress, the raw-HTTP walkthrough: docs/MCP.md. The short version:
animetext-studio --headless --serve --preload # http://127.0.0.1:8765/mcp
animetext-studio --mcp-transport stdio # harness-spawned; logs to stderrTransports |
|
Auth | optional bearer token; |
State | one app state, shared by every session; single-flight — a second run gets |
Errors |
|
Progress | MCP progress tokens on |
Catalog |
|
21 tools: get_status · list_models · load_image · get_image_info · reset ·
run_pipeline · reocr_blocks · detect · cancel_job · get_result · save_result ·
get_annotated_image · highlight_block · set_zoom · set_overlay_visible ·
get_config · set_config · export_config · import_config · warm_engines ·
unload_engines.
6 resources: result://latest · image://current · image://annotated ·
config://current · models://list · log://mcp (the activity ring, token-redacted).
// Claude Desktop / Claude Code
{"mcpServers": {"animetext-studio": {
"type": "http", "url": "http://127.0.0.1:8765/mcp",
"headers": {"Authorization": "Bearer <token>"}}}}npx -y @modelcontextprotocol/inspector --cli --transport http \
--server-url http://127.0.0.1:8765/mcp --method tools/list
./scripts/mcp_curl_demo.sh # the same protocol with curl, no SDKA refusal is a result. Every way the app can say no — 91 named faults across eight entry points, each one a test — is in docs/ERROR-MATRIX.md.
And every promise the plan made is accounted for: 132 requirements, each with the test or
command that proves it, in docs/QA.md (generated from
tests/test_p8_qa.py, so a row whose evidence disappeared fails the suite).
Configuration reference
One JSON document, schema_version 1.2 (documents written against 1.0 and 1.1 still load
and are migrated; the app writes 1.2). The machine-readable version is
animetext_studio/schemas/config.schema.json; the built-in defaults are one command away:
animetext-studio --dump-default-config
animetext-studio --validate-config my.json # {valid, errors[], warnings[]}, exit 2 if invalidexamples/config.default.json is that output, byte for byte. examples/config.custom.json is
deliberately still a 1.0 document: it loads, the keys it does not mention take their
defaults, and --verbose lists what was defaulted — an old file is never a reason to stop.
Key | Default | Range / values | Notes |
|
| the five variants | |
|
| 0–1 | NMS |
|
| 0–1 | deliberately permissive; the GUI's Recommended sets the repo's F1-optimal value |
|
| keeps aspect ratio, and loads the variant's | |
|
|
| never reports a device it does not have |
|
|
| Hayai's patch budget; |
|
| 1–512 | crops per OCR batch (the GUI exposes 1–64) |
|
| 1–1024 | raise it when blocks carry |
|
| 0–64 | pixels added around each box before cropping |
|
| NFKC-normalise the output | |
|
|
| deterministic |
|
| 0–100000 | drop boxes below this area |
|
| ||
|
| 0–1 | box fill |
|
| ||
|
| 0–1 | dimming of non-hovered boxes |
|
|
| |
|
| the GUI serves MCP by default · restart | |
|
|
| restart |
|
| non-loopback warns at startup, louder without a token · restart | |
|
| the only secret in the document; | |
|
| 10–10000 | the activity ring / |
|
|
| |
|
| remembered by the file dialogs | |
|
|
| |
|
| sets | |
|
| which environment variable to read |
Live versus restart. Every key except the five marked restart is applied to the running
app the moment it changes — thresholds, device, patch budget, overlay, reading order, even
mcp.log_capacity. The five MCP transport keys are read once, when the server is built, so a
running process stores them (an export is faithful, and the next start honours them) but cannot
move the socket you are talking to. Nothing pretends otherwise: set_config and import_config
answer with restart_required: ["mcp.port", …], and the GUI says the same in its status bar when
you import a file that changes them. Restart the app to move the endpoint.
Precedence: built-in defaults ← --config FILE ← CLI flags. Unknown keys are not fatal
— the app applies what it knows and reports the rest (--verbose prints the list; MCP
set_config refuses an unknown key outright, because a remote caller means to change
something).
Round trip: export_config → import_config is loss-free, including the token. A literal
"<redacted>" arriving in a patch means keep the live value, never set the value to
<redacted>.
Result document
result.schema.json (version 1.2), produced by --run, get_result and result://latest:
{
"schema_version": "1.2",
"created_at": "2026-11-24T15:33:35+01:00",
"stage": "full", // "detect" | "full" | "reocr" (see below)
"image": {"source": "file", "file_name": "page.png", "width": 900, "height": 1300, "sha256": "…"},
"detection": {"repo": "deepghs/AnimeText_yolo", "model": "yolo12m_animetext",
"iou_threshold": 0.35, "score_threshold": 0.05, "allow_dynamic": false, "backend": "onnx"},
"ocr": {"repo": "JustANormalTinkerer/hayai-ocr-v2.7-supernova", "device": "cpu",
"max_patches": "auto", "batch_size": 16, "max_new_tokens": 128,
"crop_padding_px": 2, "normalize_nfkc": false},
"timing_ms": {"detect": 2008, "ocr": 2031, "total": 4040},
"block_count": 12,
"blocks": [{"id": 0, "bbox": {"x0": 556, "y0": 63, "x1": 704, "y1": 392},
"label": "text_block", "score": 0.93, "text": "何!? その力は",
"reading_order": 0, "color": "#E6194B",
"error": null, "flags": [], "contained_in": null}]
}blocks[].erroris per-crop: one failed crop (OCR_FAILEDon a 4-pixel box) never loses you the other eleven.blocks[].flagscarriespossible_truncation;blocks[].contained_incarries the id of the smallest box that fully holds this one — nesting is reported, never resolved. Merging, dropping or splitting is the caller's policy, not the pipeline's.blocks[].coloris the stable id→colour used by the canvas and the export.stage: "detect"documents keep the raw detection boxes;fulldocuments carry the padded effective boxes actually fed to the OCR — the delta isocr.crop_padding_px.stage: "reocr"is a whole document re-read a block at a time: same boxes, same ids, same colours, same reading order, newtexton the blocks you asked for (reocr_blocks). It is a document, not a diff — a client that could read the old one can read this one.Determinism: everything except
created_atandtiming_msis reproducible byte for byte.
Performance notes
Measured on examples/sample_page.png (900×1300, 12 blocks), CPU only, no warm-up:
Model | Blocks | detect | ocr | total |
| 12 | 2.0 s | 2.0 s | 4.0 s |
| 13 | 2.6 s | 2.4 s | 4.9 s |
Warm it up.
--preload(GUI and headless) andwarm_engines(MCP) load the weights and run one throwaway inference, so the first real page does not pay for both. Warm means warm:get_statusreportsengines[].warmandinferences, not a guess.Which device, really?
--warm-devices cpu,cudaloads a cold engine pair per device, runs one inference through each, releases it, and prints the table:requested engine device state load_ms probe_ms total_ms --------- --------- ------ ----- ------- -------- -------- cpu detection cpu ready 1404 96 1500 cpu ocr cpu ready 812 742 1554 cuda detection cuda ready 2210 4180 6390 cuda ocr cpu FAILED — — — OCR_FAILED 4 row(s) over 2 device(s), 1 failed · 8213 ms wallTwo device columns on purpose: requested is what you asked for, device is what the engine answered with. "asked cuda, got cpu" is the sentence this table exists to make unnecessary — and it is the one the old one-line summary could not say.
--verboseadds the JSON. The table is a local measurement and stays local: the MCP door still reportswarm, which is the only part a remote caller can act on.Patch budgets. Hayai routes each crop to a tier in 128/192/256/384;
512is the fixed long-text tier and is worth setting when a page has full-width narration slabs. Lower tiers are for throughput, not for saving your eyes: on the model card's own benchmarkp128runs 148.8 images/s againstauto's 92.0 and gives up ~0.2 composite points (98.61 vs 98.84) and roughly 1.8 CER points.Batch size trades memory for wall time on the OCR stage; 16 is a sane CPU default.
unload_enginesfrees the objects, not the RSS. A warmyolo12mon CPU costs about 975 MB; unloading returns 191–244 MB and the rest stays with the process until it exits. That is the allocator and torch, not a leak — the test suite pins the measured floor deliberately instead of asserting a nicer fiction. If you need the memory back, restart the process; if you need latency back, don't unload.
Troubleshooting
Start with animetext-studio --doctor: it reads the machine the way this table reads the
symptoms, and it exits with the code a real run would have hit. The two dghs-imgutils rows are
upstream behaviour, drafted as issues in docs/UPSTREAM.md.
Symptom | Cause | Fix |
| the detection repo is gated and the token cannot see it | accept the terms, then |
| that variant is not in the bundle |
|
| the file is there and is not the bytes |
|
| the |
|
detection dies on Python 3.14 with |
| run the detection stage on Python ≤ 3.13 ( |
numpy got downgraded to 1.x and torch broke |
| reinstall numpy, then |
A wall of | imgutils installs a missing ONNX provider at import time via pip | install |
| the wheel predates the card | Blackwell (RTX 50xx, sm_120): |
| the port is taken |
|
| no display |
|
|
| add |
| text hit | raise |
| the detector found nested boxes | expected and reported; filter on |
Narration slab reads as one run-on line | Hayai is a crop reader and got a whole-paragraph box | splitting is the caller's job: take the big box, split it yourself, OCR the parts |
Non-Japanese text looks worse than Japanese | Japanese was trained on real pages; zh/ko/en on synthetic data | expect it; verify on your own pages before trusting a threshold |
Labels are boxes-of-doom (□□□) | no CJK font on the system | install one ( |
First page is much slower than the rest | cold engines |
|
Memory does not come back after | allocator floor, not a leak | |
A config key is ignored | typo or a key from a newer version |
|
Development
QT_QPA_PLATFORM=offscreen python -m pytest # 1259 passed, 41 deselected, ~39 s
QT_QPA_PLATFORM=offscreen python -m pytest -m models # real weights, offline, ~40 s
python scripts/gen_error_matrix.py --check # docs/ERROR-MATRIX.md matches the tests
python scripts/gen_qa_report.py --check # docs/QA.md matches the requirement table
animetext-studio --gui-smoke --mock # the window builds headlessThe default run touches no network, no weights, no display; -m models opts into the real
ones (still offline, still no token — they are on premises). Docs are pinned: the error matrix
and the QA checklist are generated from the tables in tests/, the MCP catalog from the live
server, and tests/test_p8_packaging.py fails if the README stops matching the parser, the
config schema or the shipped file list. tests/test_p8_qa.py is the requirement traceability
matrix itself — docs/QA.md is its printout, and it fails if a cited test or
command stops existing.
Path | What lives there |
| Qt-free: config, types, imaging, pipeline, jobs, annotation, model store, CLI |
| YOLO detector, Hayai OCR, fakes, engine lifecycle |
| window, controls, canvas, JSON pane, MCP activity dock |
| service (the door), tools, resources, bridge, server/gateway |
|
|
| the offline bundle + |
| the user's own pages, if they choose to keep them here; never published (D95) |
| |
|
|
|
|
| the build log: the plan, then decisions D1–D95 and one entry per turn |
Deliberately not done (each one is a decision, not an oversight): no de-duplication of nested boxes (flag, don't drop — D58); no language policy or "expected language" filtering (the caller knows what a manga should contain, this app does not — D60); no sub-crop splitting of dense slabs (same reason); no concurrent jobs (single-flight makes every caller deterministic — D32).
Licensing
The application code is Apache-2.0. The canonical text is LICENSE (the
unmodified Apache-2.0 body, with only the appendix's copyright line filled in), and
NOTICE is the inventory of everything in here that is not ours. Under it you may
use, modify and redistribute the code; contributions arrive under the same terms automatically
(§5); there is a patent grant (§3); the project's names and marks are not part of it (§6).
The model weights are a separate matter — they arrive in the tree when the bundle is built, and nobody here can relicense them. The repository itself publishes none of them (D95):
Component | What it is | Licence | Its text ships at |
app code — | this application | Apache-2.0 | |
| detection weights, 5 ONNX variants | GPL-3.0 |
|
| OCR weights + the | Apache-2.0 | same licence as the code; provenance in the snapshot's |
PySide6 / shiboken6 | Qt bindings | LGPL-3.0 (dynamic linking) | pip metadata |
| runtime deps | MIT / BSD / Apache, per package — see | pip metadata |
In practice:
Running it — GUI, CLI or MCP, on your machine or on your own network — asks nothing of you.
Copying, modifying or shipping the code keeps one obligation: ship
LICENSEandNOTICEwith it and note what you changed.pyproject.tomldeclareslicense = "Apache-2.0"andlicense-files = ["LICENSE", "NOTICE"], so a built wheel carries both by itself.Shipping the bundled weights carries the GPL-3.0 obligations for those files in addition: pass the text along, offer the same terms, and make the corresponding source of the weights available. Apache-2.0 is GPL-3.0-compatible in that direction, so the two licences do not conflict — but the thing to reason about is the bundled artifact you distribute, not the code in isolation.
If you cannot meet those, ship the slim wheel — which is now also what a clone is: a checkout with no
animetext_studio/models/, users runningpython scripts/fetch_models.pythemselves. Nothing in the app assumes the weights are present —--offline,--model-statusand the fallback model list are built for exactly that, so it is a packaging decision and not a fork. And whatever you do, do not re-publish the AnimeText weights: they are GPL-3.0, and their author's choice about distributing them is not yours to make on their behalf (D95).sample_scans/are the user's own pages. Nothing in this repository licenses them to anyone, the app never renders them into documentation or test output, and the repository does not carry them (D95) — the tests that want a page useexamples/sample_page.png, whichscripts/make_sample_image.pydraws.
This section is a summary, not legal advice: read LICENSE and the two upstream
model cards before you redistribute a bundle.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
OCR, transcription, file extraction, and image generation for AI agents via MCP.
Convert scanned PDFs to Markdown or EPUB, and translate PDF and EPUB books via MCP.
A paid remote MCP for HyperFrames, built to return verdicts, receipts, usage logs, and audit-ready J
Prepaid inference for agents over hosted MCP. Chat, image, and video.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables MCP clients to perform OCR on images via multimodal models through a remote server.-
- AlicenseNot gradedqualityDmaintenanceEnables MCP clients to perform local OCR on image files or base64-encoded images, returning recognized text with optional bounding boxes and confidence scores.1Apache 2.0
- AlicenseAqualityDmaintenanceEnables MCP clients like Claude Code to extract text from images, screenshots, and scanned documents via PaddleOCR PP-OCRv6.1BSD 3-Clause
- FlicenseNot gradedqualityAmaintenanceEnables Codex to submit text-to-image generation and image inspection as durable local jobs and retrieve bounded text results, hashes, relative references, and Job IDs without exposing provider-returned media bytes through MCP.-