ColorUNet-Manga-61M

Fast single-pass colorization of black-and-white manga pages, small enough to run in the browser (WebGPU). Line art, screentones and text stay pixel-exact: the network only predicts color, the page keeps its own lightness. Optional color hints and a series cover keep characters' colors consistent across pages.

Code, training and export: github.com/PianoNic/ColorUNet-Manga

Series cover as reference, black-and-white page, ColorUNet-Manga output Series cover as the color reference โ†’ black-and-white page โ†’ output. Tonikaku Kawaii (Fly Me to the Moon) ch. 305.5 ยฉ Kenjiro Hata / Shogakukan, a series not in the training data.

Files

File What
model.safetensors, config.json PyTorch weights (61.0M: 33.0M colorizer + 28.0M cover encoder)
onnx/colorizer-fp16.onnx, onnx/colorizer-fp32.onnx Browser graph without a cover: model + Lab merge in one pass
onnx/ref-encoder-fp16.onnx, onnx/colorizer-ref-fp16.onnx, onnx/null-tokens.bin Cover encoder (once per series) and the colorizer that takes its tokens
onnx/meta.json Input/output names, shapes and sizes for the ONNX files

Usage

git clone https://github.com/PianoNic/ColorUNet-Manga && cd ColorUNet-Manga/training
pip install torch torchvision timm safetensors opencv-python-headless numpy
hf download PianoNic/ColorUNet-Manga-61M --local-dir weights
python scripts/infer.py page.png --weights weights/model.safetensors --ref cover.jpg --sbs

Input: the page at a long side of 768 px (padded to a multiple of 32). Output: Lab a/b color, upsampled edge-aware onto the full-resolution page, whose own L channel is kept.

Training

Staged fine-tuning of a ConvNeXt-Tiny U-Net (encoder initialised from timm/convnext_tiny.fb_in1k):

  1. Public-domain comics (Wikimedia Commons) and CC0 clipart (Openclipart).
  2. MangaDex color pages (13,926 pages, 1,614 series), white-paper augmentation.
  3. Teacher colorings by FLUX.2 [klein] 4B of MangaDex black-and-white pages (6,663 pairs, 63 series) with the series cover as reference; adds the cover encoder. This checkpoint: stage 3c, step 10,000.

Held-out Lab a/b L1 on the stage-3 pages: 3.67 (no hints).

Training data notice: stages 2 and 3 used copyrighted manga pages, which are not redistributed and not part of this repository. Whether training on them is permitted depends on your jurisdiction; check before commercial use. Sources and licences: DATASETS.md.

Limitations

  • Skin and light hair that are bare paper in the original come out paler than in official color editions.
  • Backgrounds often get weak or patchy color; without a cover or hints, colors can drift between pages.
  • Screentone areas get muted color.

License

MIT. Encoder initialisation: timm convnext_tiny.fb_in1k (Apache-2.0).

Citation

@misc{colorunetmanga2026,
  title  = {ColorUNet-Manga: Fast Single-Pass Manga Colorization},
  author = {PianoNic},
  year   = {2026},
  url    = {https://huggingface.co/PianoNic/ColorUNet-Manga-61M}
}
Downloads last month
29
Safetensors
Model size
61M params
Tensor type
F32
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for PianoNic/ColorUNet-Manga-61M

Quantized
(1)
this model