Image-to-Text
Transformers
Safetensors
hayai
feature-extraction
ocr
vision-language
vlm
manga-ocr
cjk
multilingual
custom_code

Run this model with HF Jobs

Run JustANormalTinkerer/hayai-ocr-v2.7-supernova on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/JustANormalTinkerer/hayai-ocr-v2.7-supernova. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/JustANormalTinkerer/hayai-ocr-v2.7-supernova on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Hayai OCR v2.7 Supernova

Hayai OCR v2.7 Supernova is a ~157M-parameter crop-level OCR model for Japanese, Chinese, Korean, and English text. It pairs a SigLIP2 NaFlex vision encoder with a 12-layer causal GQA decoder to transcribe dense, stylized, vertical, horizontal, and curved text in a single pass without a separate line detector.

This checkpoint updates v2.7 with an additional 8,000-step fine-tuning run on the edgecases split of JustANormalTinkerer/hayai-synth-multilingual, merged back into the Stage 3 base weights using WiSE-FT (weight-space ensembling). Merging instead of replacing the weights improves long-text and dense-crop recognition while preserving accuracy on standard dialogue and sound effects.

Key Results

  • JMangaBench_Read v1.3.3: 98.84 composite (99.21 1-NED, 95.70% EM, 0.81% CER) with max_patches="auto" at 92.01 images/s wall throughput. Fixed p256 reaches 98.82 composite (95.78% EM, 0.88% CER) at 99.06 images/s, and even p128 reaches 98.61 composite at 148.78 images/s.
  • JMangaBench_Hard v1.0: 96.36 score (3.98% CER, 89.19% EM) with max_patches="auto" at 112.07 images/s, and 96.36 score at fixed p256. All evaluated patch tiers (p128, p256, p384, auto) exceed the previous #1 ranked leaderboard entry (95.98).
  • Long-text gains from WiSE-FT: On len_>32 crops in JMangaBench_Read, auto achieves 98.28 1-NED, 83.43% EM, and 3.53% CER; p256 reaches 81.66% EM (4.67% CER); and p512 reaches 84.62% EM (3.56% CER).
  • Single-pass adaptive routing (max_patches="auto"): Assigns each crop to a patch tier in {128, 192, 256, 384} directly from NaFlex scaling geometry (max_scale=4.0), sorting and batching by patch count with no second-pass re-runs.

Scope: Hayai is built for cropped text regions (speech bubbles, narration boxes, SFX crops). For full pages, run a text or bubble detector first.


Benchmarks

All JMangaBench results below were evaluated with RIN v1.2 (manga_nar_semantic_r10_20261020) with zero missing predictions. Higher is better for Composite, 1-NED, Score, EM, and EM NFKC; lower is better for CER.

1. JMangaBench_Read v1.3.3 (Dialogue, Narration, and Asides)

Evaluated on 7,789 crops from 1,847 pages (JMangaBench_Read):

Model Composite 1-NED (All) EM (%) CER (%) EM NFKC (%)
Hayai OCR v2.7 Supernova (auto) 98.84 99.21 95.70 [95.23, 96.13] 0.81 83.85
Hayai OCR v2.7 Supernova (p256) 98.82 99.21 95.78 [95.31, 96.20] 0.88 83.84
Hayai OCR v2.7 Supernova (p384) 98.81 99.17 95.65 [95.17, 96.08] 1.00 83.77
Hayai OCR v2.7 Supernova (p512) 98.78 99.16 95.56 [95.08, 95.99] 0.86 83.71
Hayai OCR v2.7 Supernova (p128) 98.61 98.94 94.18 [93.64, 94.68] 2.61 82.66
nar-small-R16 (experimental) 98.12 β€” 93.86 1.08 82.23
manga-ocr-base-CPT-flex (#1 ranked) 97.48 β€” 91.71 1.50 80.60
Hayai v2.5 Nova (p384) 96.63 β€” 88.20 2.38 75.59
Hayai v2.5 Nova (p256) 96.60 β€” 87.19 2.95 74.84
JMangaBench_Read v1.3.3 subset breakdown β€” auto (n = 7,789)
Section n 1-NED EM (%) 95% CI CER (%) EM NFKC (%)
all 7,789 99.21 95.70 [95.23, 96.13] 0.81 83.85
new 4,660 99.24 96.03 [95.43, 96.55] 0.60 84.36
v12_kept 3,129 99.16 95.21 [94.40, 95.90] 1.13 83.09
printed 5,877 99.57 97.07 [96.61, 97.47] 0.64 84.01
non_printed 1,912 98.11 91.47 [90.14, 92.64] 1.62 83.37
hard 784 96.37 81.76 [78.90, 84.31] 4.37 72.07
gold 1,266 97.64 87.84 [85.92, 89.52] 2.79 78.12
gold_random_audit 482 99.70 97.72 [95.96, 98.72] 0.41 87.97
len_1-4 1,504 98.39 95.74 [94.60, 96.65] 1.66 83.78
len_5-16 4,675 99.38 96.26 [95.67, 96.76] 0.57 84.92
len_17-32 1,441 99.62 95.28 [94.06, 96.26] 0.39 82.44
len_>32 169 98.28 83.43 [77.10, 88.28] 3.53 66.86
orient_vertical 7,158 99.28 96.17 [95.70, 96.59] 0.62 83.86
orient_horizontal 439 98.28 90.21 [87.07, 92.65] 3.79 84.28
orient_square 192 98.81 90.62 [85.67, 93.99] 1.00 82.29
role_dialogue 6,948 99.30 96.09 [95.60, 96.52] 0.66 83.59
role_narration 504 99.33 95.24 [93.01, 96.78] 0.58 86.31
role_other 331 97.16 88.82 [84.97, 91.78] 4.63 85.80
role_sfx 6 91.67 66.67 [30.00, 90.32] 6.25 66.67
JMangaBench_Read v1.3.3 subset breakdown β€” p256 (n = 7,789)
Section n 1-NED EM (%) 95% CI CER (%) EM NFKC (%)
all 7,789 99.21 95.78 [95.31, 96.20] 0.88 83.84
new 4,660 99.25 96.09 [95.50, 96.61] 0.67 84.29
v12_kept 3,129 99.14 95.30 [94.50, 95.99] 1.21 83.16
printed 5,877 99.58 97.19 [96.74, 97.58] 0.73 84.02
non_printed 1,912 98.07 91.42 [90.08, 92.60] 1.62 83.26
hard 784 96.38 82.02 [79.17, 84.55] 5.31 72.19
gold 1,266 97.64 87.99 [86.09, 89.67] 3.33 78.20
gold_random_audit 482 99.69 97.72 [95.96, 98.72] 0.34 87.97
len_1-4 1,504 98.33 95.48 [94.31, 96.42] 1.73 83.44
len_5-16 4,675 99.42 96.53 [95.97, 97.02] 0.51 85.05
len_17-32 1,441 99.59 95.28 [94.06, 96.26] 0.41 82.51
len_>32 169 97.98 81.66 [75.14, 86.77] 4.67 65.09
orient_vertical 7,158 99.26 96.19 [95.72, 96.61] 0.72 83.77
orient_horizontal 439 98.47 90.89 [87.83, 93.24] 3.41 85.19
orient_square 192 98.83 91.67 [86.89, 94.81] 1.11 83.33
role_dialogue 6,948 99.29 96.17 [95.69, 96.60] 0.75 83.55
role_narration 504 99.35 95.04 [92.78, 96.62] 0.62 86.31
role_other 331 97.31 89.12 [85.31, 92.04] 4.37 86.40
role_sfx 6 91.67 66.67 [30.00, 90.32] 6.25 66.67
JMangaBench_Read v1.3.3 subset breakdown β€” p384 (n = 7,789)
Section n 1-NED EM (%) 95% CI CER (%) EM NFKC (%)
all 7,789 99.17 95.65 [95.17, 96.08] 1.00 83.77
new 4,660 99.22 95.88 [95.27, 96.41] 0.91 84.16
v12_kept 3,129 99.11 95.30 [94.50, 95.99] 1.15 83.19
printed 5,877 99.53 97.07 [96.61, 97.47] 0.89 83.95
non_printed 1,912 98.08 91.27 [89.92, 92.45] 1.57 83.21
hard 784 96.23 81.63 [78.77, 84.19] 6.28 72.07
gold 1,266 97.53 87.60 [85.67, 89.30] 3.94 77.96
gold_random_audit 482 99.65 97.30 [95.44, 98.42] 0.38 87.55
len_1-4 1,504 98.32 95.48 [94.31, 96.42] 1.77 83.51
len_5-16 4,675 99.35 96.15 [95.56, 96.66] 0.60 84.75
len_17-32 1,441 99.63 95.49 [94.29, 96.45] 0.38 82.65
len_>32 169 98.08 84.62 [78.41, 89.28] 5.70 68.64
orient_vertical 7,158 99.23 96.10 [95.63, 96.53] 0.88 83.75
orient_horizontal 439 98.49 90.43 [87.32, 92.84] 2.93 84.74
orient_square 192 98.81 90.62 [85.67, 93.99] 1.00 82.29
role_dialogue 6,948 99.26 96.03 [95.54, 96.46] 0.92 83.49
role_narration 504 99.31 95.44 [93.25, 96.94] 0.58 86.51
role_other 331 97.25 88.52 [84.63, 91.52] 3.74 85.80
role_sfx 6 91.67 66.67 [30.00, 90.32] 6.25 66.67
JMangaBench_Read v1.3.3 subset breakdown β€” p512 (n = 7,789)
Section n 1-NED EM (%) 95% CI CER (%) EM NFKC (%)
all 7,789 99.16 95.56 [95.08, 95.99] 0.86 83.71
new 4,660 99.20 95.75 [95.13, 96.29] 0.65 84.03
v12_kept 3,129 99.11 95.27 [94.47, 95.96] 1.18 83.22
printed 5,877 99.53 97.02 [96.56, 97.43] 0.68 83.99
non_printed 1,912 98.03 91.06 [89.69, 92.25] 1.70 82.85
hard 784 96.24 81.25 [78.37, 83.83] 4.42 71.43
gold 1,266 97.55 87.44 [85.50, 89.15] 2.83 77.65
gold_random_audit 482 99.68 97.51 [95.70, 98.57] 0.41 87.76
len_1-4 1,504 98.40 95.61 [94.46, 96.54] 1.68 83.78
len_5-16 4,675 99.32 96.04 [95.45, 96.56] 0.61 84.68
len_17-32 1,441 99.56 95.21 [93.98, 96.20] 0.45 82.37
len_>32 169 98.26 84.62 [78.41, 89.28] 3.56 67.46
orient_vertical 7,158 99.22 96.03 [95.55, 96.46] 0.67 83.74
orient_horizontal 439 98.40 89.52 [86.31, 92.05] 3.87 83.37
orient_square 192 98.66 91.67 [86.89, 94.81] 0.93 83.33
role_dialogue 6,948 99.24 95.93 [95.44, 96.37] 0.71 83.43
role_narration 504 99.43 95.44 [93.25, 96.94] 0.55 86.51
role_other 331 97.22 88.52 [84.63, 91.52] 4.69 85.50
role_sfx 6 91.67 66.67 [30.00, 90.32] 6.25 66.67
JMangaBench_Read v1.3.3 subset breakdown β€” p128 (n = 7,789)
Section n 1-NED EM (%) 95% CI CER (%) EM NFKC (%)
all 7,789 98.94 94.18 [93.64, 94.68] 2.61 82.66
new 4,660 99.01 94.40 [93.70, 95.02] 1.71 83.00
v12_kept 3,129 98.85 93.86 [92.97, 94.65] 3.99 82.13
printed 5,877 99.26 95.46 [94.89, 95.96] 2.68 82.81
non_printed 1,912 97.96 90.27 [88.86, 91.52] 2.26 82.17
hard 784 95.71 79.72 [76.76, 82.39] 8.29 71.05
gold 1,266 97.06 85.78 [83.75, 87.60] 6.03 77.09
gold_random_audit 482 99.26 95.64 [93.43, 97.13] 2.60 86.93
len_1-4 1,504 98.41 95.68 [94.53, 96.59] 1.62 83.91
len_5-16 4,675 99.38 96.11 [95.51, 96.62] 0.56 84.62
len_17-32 1,441 99.23 91.74 [90.21, 93.05] 2.53 79.94
len_>32 169 89.20 48.52 [41.10, 56.00] 16.31 40.24
orient_vertical 7,158 99.08 94.72 [94.18, 95.21] 1.99 82.69
orient_horizontal 439 97.42 88.61 [85.30, 91.25] 9.48 83.60
orient_square 192 97.21 86.98 [81.48, 91.02] 8.06 79.17
role_dialogue 6,948 99.08 94.67 [94.12, 95.18] 2.22 82.54
role_narration 504 98.79 91.87 [89.15, 93.95] 2.77 82.94
role_other 331 96.44 87.92 [83.96, 91.00] 10.95 84.89
role_sfx 6 91.67 66.67 [30.00, 90.32] 6.25 66.67

2. JMangaBench_Hard v1.0 (SFX, Stylized Lettering, and Handwriting)

Evaluated on 3,015 difficult crops from 1,339 pages (JMangaBench_Hard):

Model Score CER (%) EM (%) EM NFKC (%)
Hayai OCR v2.7 Supernova (auto) 96.36 3.98 89.19 [88.03, 90.25] 88.86
Hayai OCR v2.7 Supernova (p256) 96.36 4.23 89.12 [87.96, 90.18] 88.76
Hayai OCR v2.7 Supernova (p384) 96.35 3.97 89.32 [88.17, 90.37] 88.99
Hayai OCR v2.7 Supernova (p128) 96.21 4.51 88.92 [87.75, 89.99] 88.56
manga-ocr-ar-experimental (#1 ranked) 95.98 4.75 88.52 88.26
nar-small-R16 (experimental) 93.92 7.21 82.89 82.62
PaddleOCR-VL-1.6 manga LoRA v6 91.87 9.21 78.57 69.55
Hayai v2.5 Nova (p256) 88.87 11.61 72.34 71.87
JMangaBench_Hard v1.0 subset breakdown β€” auto (n = 3,015)
Section n Score CER (%) EM (%) 95% CI EM NFKC (%)
all 3,015 96.36 3.98 89.19 [88.03, 90.25] 88.86
agreed 2,161 98.16 2.05 94.45 [93.40, 95.34] 93.98
human 854 91.83 8.22 75.88 [72.90, 78.63] 75.88
box_adjusted 75 87.73 11.59 70.67 [59.56, 79.76] 70.67
style_sfx_lettering 1,835 96.31 4.35 89.81 [88.34, 91.11] 89.59
style_handwritten 1,056 96.43 3.52 88.73 [86.68, 90.50] 88.16
style_decorative_font 73 96.30 4.01 80.82 [70.34, 88.22] 82.19
style_printed 51 96.98 4.08 88.24 [76.62, 94.50] 86.27
orient_vertical 1,842 96.17 4.11 88.49 [86.95, 89.87] 88.17
orient_horizontal 670 97.37 2.84 91.94 [89.63, 93.77] 91.49
orient_curved_or_diagonal 501 95.75 5.14 88.22 [85.11, 90.76] 88.02
len_1-2 867 96.73 3.25 94.69 [93.00, 96.00] 94.69
len_3-4 1,576 96.55 3.68 90.16 [88.60, 91.54] 89.78
len_5-9 428 95.29 4.73 80.37 [76.35, 83.86] 79.21
len_>=10 144 95.30 4.37 71.53 [63.67, 78.26] 72.22
JMangaBench_Hard v1.0 subset breakdown β€” p256 (n = 3,015)
Section n Score CER (%) EM (%) 95% CI EM NFKC (%)
all 3,015 96.36 4.23 89.12 [87.96, 90.18] 88.76
agreed 2,161 98.18 2.11 94.35 [93.30, 95.25] 93.89
human 854 91.76 8.87 75.88 [72.90, 78.63] 75.76
box_adjusted 75 87.31 14.63 70.67 [59.56, 79.76] 70.67
style_sfx_lettering 1,835 96.45 4.26 90.19 [88.74, 91.47] 89.92
style_handwritten 1,056 96.21 4.01 88.07 [85.97, 89.89] 87.50
style_decorative_font 73 95.82 6.02 78.08 [67.32, 86.03] 79.45
style_printed 51 97.11 3.67 88.24 [76.62, 94.50] 86.27
orient_vertical 1,842 96.11 4.28 88.27 [86.72, 89.66] 87.95
orient_horizontal 670 97.45 3.13 91.94 [89.63, 93.77] 91.34
orient_curved_or_diagonal 501 95.87 5.65 88.62 [85.54, 91.11] 88.42
len_1-2 867 97.00 2.94 95.16 [93.52, 96.40] 95.04
len_3-4 1,576 96.56 3.64 90.16 [88.60, 91.54] 89.78
len_5-9 428 94.98 5.11 80.61 [76.60, 84.07] 79.44
len_>=10 144 94.45 5.58 66.67 [58.62, 73.84] 67.36
JMangaBench_Hard v1.0 subset breakdown β€” p384 (n = 3,015)
Section n Score CER (%) EM (%) 95% CI EM NFKC (%)
all 3,015 96.35 3.97 89.32 [88.17, 90.37] 88.99
agreed 2,161 98.08 2.15 94.40 [93.35, 95.29] 93.94
human 854 91.99 7.94 76.46 [73.50, 79.19] 76.46
box_adjusted 75 87.35 12.20 70.67 [59.56, 79.76] 70.67
style_sfx_lettering 1,835 96.36 4.30 89.81 [88.34, 91.11] 89.59
style_handwritten 1,056 96.24 3.71 88.92 [86.88, 90.67] 88.35
style_decorative_font 73 97.35 2.74 83.56 [73.43, 90.34] 84.93
style_printed 51 97.11 3.67 88.24 [76.62, 94.50] 86.27
orient_vertical 1,842 96.12 4.24 88.27 [86.72, 89.66] 87.95
orient_horizontal 670 97.26 2.66 92.39 [90.13, 94.16] 91.94
orient_curved_or_diagonal 501 96.00 4.86 89.22 [86.20, 91.64] 89.02
len_1-2 867 96.77 3.13 94.93 [93.26, 96.20] 94.93
len_3-4 1,576 96.50 3.73 90.16 [88.60, 91.54] 89.78
len_5-9 428 95.25 4.80 79.91 [75.85, 83.43] 78.74
len_>=10 144 95.55 4.14 74.31 [66.60, 80.75] 75.00
JMangaBench_Hard v1.0 subset breakdown β€” p128 (n = 3,015)
Section n Score CER (%) EM (%) 95% CI EM NFKC (%)
all 3,015 96.21 4.51 88.92 [87.75, 89.99] 88.56
agreed 2,161 98.06 2.28 94.17 [93.10, 95.08] 93.66
human 854 91.52 9.38 75.64 [72.65, 78.40] 75.64
box_adjusted 75 87.98 14.02 70.67 [59.56, 79.76] 70.67
style_sfx_lettering 1,835 96.39 4.49 90.08 [88.63, 91.37] 89.81
style_handwritten 1,056 95.95 4.44 87.88 [85.77, 89.71] 87.31
style_decorative_font 73 95.29 4.93 78.08 [67.32, 86.03] 79.45
style_printed 51 96.10 5.31 84.31 [71.99, 91.83] 82.35
orient_vertical 1,842 96.09 4.55 88.38 [86.84, 89.77] 88.00
orient_horizontal 670 97.05 3.71 91.49 [89.14, 93.38] 91.04
orient_curved_or_diagonal 501 95.51 5.59 87.62 [84.45, 90.23] 87.43
len_1-2 867 96.81 3.13 94.93 [93.26, 96.20] 94.93
len_3-4 1,576 96.50 3.70 90.04 [88.46, 91.42] 89.59
len_5-9 428 94.84 5.26 79.91 [75.85, 83.43] 78.74
len_>=10 144 93.40 6.65 67.36 [59.34, 74.48] 68.06

3. Throughput

Measured on a single Tesla T4 in fp16 with CUDA Graphs enabled (auto runs single-pass without escalation). Average transcription length is 11.9 characters/image on JMangaBench_Read (7,789 crops) and 4.1 characters/image on JMangaBench_Hard (3,015 crops).

Benchmark & Mode Wall Time (s) Wall Throughput (img/s) Pure GPU (img/s) Peak Batch (img/s) Generation Speed (chars/s) Planning (ms) Host Overhead
Read (p128) 52.35 148.78 149.34 222.78 1,774.3 750.1 0.37%
Read (p256) 78.63 99.06 99.34 142.70 1,178.7 257.1 0.29%
Read (auto) 84.65 92.01 92.33 282.76 1,094.1 729.3 0.34%
Read (p384) 100.69 77.36 77.50 100.90 921.2 231.5 0.19%
Read (p512) 128.23 60.74 60.83 76.05 722.3 227.5 0.15%
Hard (p128) 15.63 192.86 193.73 311.86 793.6 585.4 0.45%
Hard (auto) 26.90 112.07 112.53 330.05 462.4 905.9 0.41%
Hard (p384) 38.06 79.22 79.37 264.76 327.0 179.5 0.20%

Quickstart

from PIL import Image
from transformers import AutoModel, AutoProcessor

MODEL_ID = "JustANormalTinkerer/hayai-ocr-v2.7-supernova"

model = AutoModel.from_pretrained(MODEL_ID, trust_remote_code=True).cuda().eval()
processor = AutoProcessor.from_pretrained(MODEL_ID, trust_remote_code=True)

# Single crop (Japanese, Chinese, Korean, or English) -> str
image = Image.open("example.png").convert("RGB")
text = model.ocr(
    image,
    processor,
    max_patches="auto",
    max_new_tokens=128,
    use_cuda_graph=True,
)
print(text)

# Batched crops -> automatically bucketed and sorted by patch count
texts = model.ocr(
    [image] * 128,
    processor,
    max_patches="auto",
    batch_size=64,
    escalate=False,
    max_new_tokens=128,
)
  • trust_remote_code=True is required for the custom projector, depth fusion, split block-causal attention, 2D mRoPE, and NaFlex patch routing.
  • model.generate(...) is also supported for custom pipelines. Keep greedy decoding and repetition_penalty=1.0.
  • Choosing max_patches: "auto" is the best general default, giving the lowest overall CER and strong long-text accuracy. Fixed 256 is nearly identical on standard dialogue while running slightly faster; fixed 128 maximizes speed and keeps memory minimal when crops are short; fixed 384 or 512 is useful if your workload is dominated by dense, multi-line text blocks.
  • Set HAYAI_DISABLE_COMPILE=1 if you want to disable torch.compile(dynamic=True) on custom kernels (inference already runs eagerly inside inference_mode).
  • Additional utilities are available at hayai-ocr on GitHub.
Optional: Lightweight NFKC post-processing snippet

Official JMangaBench scoring uses RIN v1.2. For simple local cleanup:

import re
import unicodedata

def normalize_text(text: str) -> str:
    if not text:
        return ""
    text = unicodedata.normalize("NFKC", str(text))
    text = re.sub(r"[\r\n\t]+", " ", text)

    cjk_char = r"[\u4e00-\u9fff\u3040-\u30ff\u3400-\u4dbf\uac00-\ud7af]"
    text = re.sub(f"({cjk_char})\\s+({cjk_char})", r"\1\2", text)

    return re.sub(r"\s+", " ", text).strip()

Architecture

v2.7 Supernova combines a SigLIP2 NaFlex vision encoder (d_vision=768, 12 layers) with a 12-layer GQA decoder (d_model=512, d_ffn=2048, 8 query heads, 2 KV heads, d_head=64, SwiGLU, QK RMSNorm).

Hayai OCR v2.7 Supernova architecture

A few design choices carry most of the accuracy and speed improvements over v2.5:

  1. Dual-order VisualCausalFlow: Inside DSCProjector, a zero-initialized 3x3 depthwise spatial mixer captures local stroke continuity, followed by an 8-head gated attention block over the compressed 2D grid. Four heads run row-major left-to-right (for English, Chinese, Korean, and horizontal Japanese) and four run column-major right-to-left, top-to-bottom (for vertical manga layouts).
  2. Multi-depth feature fusion (StaticDepthFusion): Instead of using only the final SigLIP2 layer, all 12 encoder depths are 2x2 average-pooled to match the unshuffle grid, normalized with per-depth RMSNorm, projected to d_model, and combined with learned per-decoder-layer softmax weights and per-channel gains. Earlier layers retain sharp stroke details (helpful for dense kanji/hanzi, dakuten/handakuten, and tight kerning), while deeper layers carry broader context.
  3. IDS supervision and offset 2D mRoPE: A 226-class Ideographic Description Sequence auxiliary head at decoder layer 6 sharpens character structure during training (drop_ids_head() removes it for pure inference). Text rotary indices are offset by text_rope_offset=64.0 to separate them from 2D visual coordinates, paired with antialiased bilinear interpolation of SigLIP2 position embeddings.
  4. Fused inference engine (_FastEngine): During prefill, the final decoder layer prunes vision queries so only text tokens run attention and FFN. Attention is split into vision-to-vision and causal text paths with KV-head-folded GQA, fused QKV/SwiGLU projections, fused QK-norm + RoPE, and pre-folded residual scales. plan_batches buckets crops by patch tier and sorts by (m_vis, nh * nw), packing ragged batches whenever padding exceeds 5% and running decode steps inside CUDA Graphs.

Version Comparison

Component v2.1 v2.5 Nova v2.7 Supernova
Vision projector 2-layer MLP (1->1) DSCProjector (4->1 unshuffle + MLP) DSC + 3x3 DW mix + dual-order VisualCausalFlow
Vision features Last encoder layer Last encoder layer All 12 encoder depths (StaticDepthFusion)
Decoder vision tokens N patches N / 4 tokens N / 4 tokens
Positional encoding 2D mRoPE (offset 0) 2D mRoPE (offset 0) 2D mRoPE (text_rope_offset=64.0) + antialiased pos-embed
Decoder attention Standard block-causal Learnable residual scaling Residual scaling + final-layer query pruning + split GQA
Inference engine Dynamic greedy loop Static KV + RoPE cache Packed vision + CUDA Graphs + folded weights + auto bucketing
Auxiliary loss None 226-class IDS head 226-class IDS head (layer 6; drop_ids_head() supported)
Multilingual CJK+EN Baseline 60k alignment stage Stage 2/3 multilingual corpus + dual-order flow + WiSE-FT edgecases

Training

Training started from the v2.5 checkpoint, with all newly added v2.7 modules (StaticDepthFusion, VisualCausalFlow, and the 3x3 depthwise mixer) zero-initialized as residual branches so optimization began cleanly from v2.5 weights.

The base stages ran on Kaggle using 2x NVIDIA Tesla T4 GPUs (micro-batch size 64 per GPU with gradient accumulation to an effective batch size of 128):

  1. Stage 1 β€” Japanese and Manga Corpus (2 epochs): JustANormalTinkerer/animetext-ocr-jp-only-v2 + JustANormalTinkerer/hayai-synth-dataset-v2
  2. Stage 2 β€” Multilingual CJK + English Expansion (1 epoch): Stage 1 datasets + JustANormalTinkerer/hayai-synth-multilingual
  3. Stage 3 β€” Multilingual Refinement (2 epochs): JustANormalTinkerer/animetext-ocr-jp-only-v2 + JustANormalTinkerer/hayai-synth-multilingual
  4. Stage 4 β€” Long-Text Edgecase Fine-Tuning and WiSE-FT Merge: To strengthen transcription on long passages and dense multi-line crops without regressing on standard manga dialogue or SFX, the Stage 3 checkpoint was fine-tuned for 8,000 steps on the edgecases split of JustANormalTinkerer/hayai-synth-multilingual and then combined back with the Stage 3 weights via WiSE-FT.

Best Practices and Limitations

  • Keep repetition_penalty=1.0: Repeated characters are common and valid in CJK text (such as onomatopoeia like ドキドキ, reduplication, and repeated numbers). Any penalty above 1.0 hurts accuracy.
  • Use max_patches="auto" for mixed workloads: It matches each crop to the right patch budget in a single pass. If you need strictly uniform tensor shapes or want slightly higher speed on mostly short dialogue crops, max_patches=256 is a strong alternative.
  • Crop-level input only: Passing full comic pages without cropping text regions will not work.
  • Short-text sensitivity: Many manga crops contain only 1 to 4 characters, where a single misread glyph drops Exact Match immediately.
  • Multilingual domain gap: Chinese, Korean, and English recognition is trained primarily on synthetic data, so accuracy on noisy real-world non-Japanese crops may vary.

Citations

@inproceedings{baek2026mangav26,
  title     = {{Manga109-v2026: Revisiting Manga109 Annotations for Modern Manga Understanding}},
  author    = {Baek, Jeonghun and Miyai, Atsuyuki and Onohara, Shota and Ikuta, Hikaru and Aizawa, Kiyoharu},
  booktitle = {Culture x AI Workshop at ICML 2026},
  year      = {2026},
}

@article{multimedia_aizawa_2020,
  author    = {Kiyoharu Aizawa and Azuma Fujimoto and Atsushi Otsubo and Toru Ogawa and Yusuke Matsui and Koki Tsubota and Hikaru Ikuta},
  title     = {Building a Manga Dataset "Manga109" with Annotations for Multimedia Applications},
  journal   = {IEEE MultiMedia},
  volume    = {27},
  number    = {2},
  pages     = {8--18},
  year      = {2020}
}

@inproceedings{baek2022COO,
  title     = {COO: Comic Onomatopoeia Dataset for Recognizing Arbitrary or Truncated Texts},
  author    = {Baek, Jeonghun and Matsui, Yusuke and Aizawa, Kiyoharu},
  booktitle = {Proceedings of the European Conference on Computer Vision (ECCV)},
  year      = {2022}
}
Downloads last month
10,617
Safetensors
Model size
0.2B params
Tensor type
F32
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for JustANormalTinkerer/hayai-ocr-v2.7-supernova

Quantizations
1 model

Datasets used to train JustANormalTinkerer/hayai-ocr-v2.7-supernova

Space using JustANormalTinkerer/hayai-ocr-v2.7-supernova 1