Manga character parts — mobile inference pack
Optional components for head hair/skin and body-skin reference guidance. Complete download size: 864,790,464 bytes (both foreground precisions and the body extension included) before device-specific Core ML compilation. This is a multi-model research integration, not a universally accurate manga segmenter or a standalone colorizer.
Components
head.onnx: DeepGHS head_detect_v2.0_s; author-compatible 640-square RGB bicubic input.foreground.onnx: original FP32 SkyTNT ISNetIS (176,069,933 bytes); foreground segmentation at 1024.foreground-fp16.onnx: optional FP16 derivative (88,070,593 bytes), same architecture and float32 public input/output.Parts.mlpackage: original StyleAnime anime parser converted to FP16 Core ML; externally ImageNet-normalized float32 RGB[1,3,512,512], int32 labels[1,512,512](19 classes).generator512.onnx: shape-only derivative of Faridzar's manga-colorization-v2 FP16 export, fixed[1,5,512,512]. All weights and nodes preserved; output RGB is already 0–1. It does not replace the variable-size whole-page model.
See manifest.json for immutable checksums and SOURCES.md for pinned upstream sources, input contracts and evaluation limits. The current application uses best-effort character matching and masks, dialogue protection, separate reference palettes and native-resolution part composition. Masks alone do not establish reliable ownership. Profiles, closed eyes, overlapping people and hair outside head crops can be left unassigned.
Attribution and terms
Each component retains its upstream terms; no blanket license is assigned to this collection. Head detection's model card declares MIT; foreground declares Apache-2.0. Full available notices and pinned cards accompany the pack under notices/.
The parser architecture is MIT (copyright 2019 zll), but the original StyleAnime checkpoint has no explicit redistribution license in the inspected source. The generator export mirror declares MIT; its upstream pretrained weights likewise have no explicit license in the inspected repository. These labels do not establish unrestricted rights to the underlying weights. Permissions for those weights remain unresolved, and this experimental pack is not a claim of commercial clearance. Upstream authors retain their rights.
Validation
Exact input/resampling checks, original-vs-export comparisons, actual Swift inference, and a public pink-reference/line-art end-to-end fixture were evaluated locally. Conversion agreement is not semantic accuracy. Physical-device quality and independent human scoring remain unmeasured.
Optional foreground precision
Both weights are retained. The application exposes Fast (FP16) and Full precision (FP32), with FP16 as the current app default. Upgrading an existing pack needs only the additional 88 MB file; all unchanged files are checksum-verified and reused. Model precision has its own mask, palette and rendered-page cache identities.
The FP16 conversion uses onnx 1.17.0 and onnxconverter-common 1.16.0, keep_io_types=True, min_positive_val=0 and max_finite_val=65504, with the converter's default blocked operations. Original foreground source: skytnt/anime-seg revision 493cb60893f47441b26ec4fb9a306bce9e342982, isnetis.onnx. Its Apache-2.0 notices remain applicable. Reproduction script: convert_foreground_fp16.py.
Local Apple Silicon native ORT/Core ML measurements over eight public head crops: warmed foreground calls approximately 0.34–0.35 seconds FP32 versus 0.215–0.225 seconds FP16; process peak RSS approximately 629–635 MB versus 466 MB. One pixel across those eight 512-square masks changed sides of the 0.5 threshold; maximum probability error 0.00854. Two end-to-end public pages kept identical character review outcomes; one had exactly identical rendered pixels, the other a mean absolute channel error of 0.001267/255 and maximum 3/255. These are limited local comparisons, not an accuracy guarantee for arbitrary comics.
CPU-only inference also completed, but FP16 was not faster (4.02 versus 3.94 seconds) and used more process memory (1.01 GB versus 745 MB) on the measured fixture. Prefer FP32 for CPU-only use. iPhone/iPad runtime and quality measurements remain pending.
Optional body skin extension (2026-10-28)
body-skin.onnx adds AnimeSeg v3 body-skin segmentation. Existing head packs remain usable without it; adding it downloads 468,065,838 bytes. It does not replace the head/face parser. The app uses only class 1 skin, in detected character crops and a head-anchored torso crop for tall characters, then unites masks before transfer. Clothing, face, hair and background classes do not receive this additional paint. Character ownership is approximate; occasional wristband/clothing spill and missed skin remain possible.
Source: suzukimain/AnimeSeg, immutable revision c96402281c15e7761392012ec04f171ec884866f, models/anime_seg_mask2former_v3.safetensors. Checkpoint SHA-256: f6764a379496712a92d1a85f852a81155cd79132a3e050b77c972be7e1cec394. The inspected source and model card do not state checkpoint redistribution terms. Permissions remain unresolved; no blanket license or commercial clearance is claimed. Original authors retain their rights.
FP32 ONNX opset 17; externally ImageNet-normalized float32 RGB [1,3,768,768], int32 class labels [1,768,768]. Output mask interpolation is processed in 64-row stripes, using the same pixel-center bilinear coordinates and replicated boundaries as the original. Grid coordinates explicitly match input dtype for the native ORT GridSample kernel. All inference parameters load strictly; only the unused training-loss buffer retains the checkpoint's original length. body-skin.json gives exact size/hash; body-skin/config.json and body-skin/convert_body_skin.py reproduce the conversion with the pinned source checkpoint.
Native Apple Silicon ORT 1.24.2 produced exactly matching labels on two public controls versus the original 768-square export, and additional exposed-chest and clothed-portrait controls were inspected. A 512-input candidate missed substantial skin and was rejected. Compact-weight and full-FP16 candidates did not improve measured peak memory and were not selected. The app uses two CPU inference threads, disables weight prepacking and requests CPU arena shrinkage after runs. Local sequential four-crop runs took roughly 4.5–4.7 seconds per crop with about 2.45 GB process peak RSS; the complete public identity/head/body/generator/composition probe peaked at about 3.64 GB. These are host process measurements, not iPhone/iPad performance guarantees. Body masks are cached by exact prepared input and model revision.